Input/Output Text Format for CAMgeometricEntity Classes

 

The general form of the text description of the geometric entity classes is

 

[BEGIN_ENTITY]
Entity Class Name
[ENTITY_DATA]
Data Required for Entity Constructor (Entity specific)
[END_ENTITY]

 Formats for specific entities

CAMcircleEntity

CAMxyRectangle

CAMpolygonEntity

 

The general form for the CAMcombined entity is

[BEGIN_ENTITY]
CAMcombinedEntity
[ENTITY_DATA]
Individual entity text descriptions 
[END_ENTITY]


CAMcircleEntity

General Form:

[BEGIN_ENTITY]
CAMcircleEntity
[ENTITY_DATA]
x_center y_center
radius
orientation
[END_ENTITY] 

Sample:

For a circle with center (0.3, 0.3) and radius 0.2 the text description is

[BEGIN_ENTITY]
CAMcircleEntity
[ENTITY_DATA]
0.3  0.3
0.2
1
[END_ENTITY]

 


CAMxyRectangleEntity

General Form:

[BEGIN_ENTITY]
CAMxyRectangleEntity
[ENTITY_DATA]
x_lowerLeft  y_lowerLeft
x_upperRight y_upperRight
orientation
[END_ENTITY]

 

Sample:

For a rectangle whose lower left corner is at (0.1,0.1) and upper right corner is at (0.8,0.8) the text description is

[BEGIN_ENTITY]
CAMxyRectangleEntity
[ENTITY_DATA]
0.1   0.1
0.8   0.8
1
[END_ENTITY]


CAMpolygonEntity

General Form:

[BEGIN_ENTITY]
CAMpolygonEntity
[ENTITY_DATA]
number_of_vertices
x_vertex_1    y_vertex_1
x_vertex_2    y_vertex_2
           *
           *
           *
x_vertex_n   y_vertex_n
orientation
[END_ENTITY] 

Sample :

For a 10 sided polygon, the text description would be


[BEGIN_ENTITY]
CAMpolygonEntity
[ENTITY_DATA]
10
0.8  0.5
0.742705  0.676336
0.592705  0.785317
0.407295  0.785317
0.257295  0.676336
0.2  0.5
0.257295  0.323664
0.407295  0.214683
0.592705  0.214683
0.742705  0.323664
1
[END_ENTITY]