Geom2
Current Version
2
Subtype of
Serializable
Fields
Entity/Object
Variable
Description
integer
Version.
integer
Object type: 0 for a point object, 1 for a curve object, 2 for a solid object, and -1 for a mixed object.
Boolean
1 if void regions are labeled; 0 otherwise.
double
Relative geometry tolerance.
double
Relative resolution tolerance.
integer
nv
Number of vertices.
VertexData[nv]
vertex
Matrix of vertex data.
integer
ne
Number of edges.
EdgeData[ne]
edge
Matrix of edge data.
integer
nc
Number of curves.
integer
na
Number of attributes.
Attribute[na]
Attributes. The Attribute type is undocumented because it is only used internally.
In the table above, the entity types are defined as follows:
VertexData
Entity/Object
Variable
Description
double[2]
Coordinates of the vertex.
int
The domain number if the vertex is isolated. If the vertex is not isolated this value is unspecified.
double
Relative tolerance of the vertex.
EdgeData
Entity/Object
Variable
Description
int[2]
Start and end vertex of the edge, respectively (1-based).
double[2]
Parameter values of the two vertices.
int[2]
The left and right domain number of the edge, respectively.
int
Signed index of the underlying curve (1-based). The sign indicates the direction of the edge relative the curve.
double
Relative tolerance of the edge.
Description
The Geom2 type represents a geometry object in 2D that is not an assembly and is not virtual. The geometry object must not be self-intersecting.
Example
A straight line in 2D:
# Major & minor version
0 1
1 # number of tags
# Tags
3 ls1
1 # number of types
# Types
3 obj
# --------- Object 0 ----------
0 0 1
5 Geom2 # class
2 # version
1 # type
1 # voidsLabeled
1e-10 # gtol
0.0001 # resTol
2 # number of vertices
# Vertices
# X Y dom tol
0 0 -1 NAN
1 1.5 -1 NAN
1 # number of edges
# Edges
# vtx1 vtx2 s1 s2 up down curve tol
1 2 0 1 0 0 1 NAN
1 # number of curves
# Curves
# Curve 1
11 BezierCurve # class
1 # version
2 # sdim
0 # rational?
1 # degree
# homogeneous control points
0 0
1 1.5
# Attributes
0 # nof attributes