A face object uses four vertices and four edges to define the geometry to be drawn. In examples,
the pFace variable stores a pointer to the face object.
Vertices
The Vertices property defines four vertices of the face in three-dimensional coordinates. Vertices are enumerated as
0, 1, 2, 3 and either can lie in the same plane or world space (3D). All vertices are connected by linear
segments in a closed quadrangular figure. The end of the current segment is the start of the next segment and the
last segment connects with the first segment. Linear segments are edges which are also enumerated as 0, 1, 2, and 3. When
two vertices coincide, a triangle will be drawn. All vertices have the coordinates (0,0,0) by default.
To get the vertex, use the getVertexAt() method which requires a vertex index in the range 0 to 3 as the first
argument of an Integer type, requires a reference to an existing three-dimensional point instance as the second argument
of the OdGePoint3d type, and returns the specified vertex through the second argument. For example:
To set the vertex, use the setVertexAt() method which requires a vertex index in the range 0 to 3 as the first
argument of an Integer type, requires a three-dimensional point as the second argument of the OdGePoint3d type, and
does not return a value. For example:
The Edges property defines the visibility for four edges of the face as a Boolean value. If the property is True,
the corresponding edge is visible. If the property is False, the corresponding edge is invisible. Each edge
can be switched independently. All edges are visible (True) by default.
To check the edge visibility, use the isEdgeVisibleAt() method which requires a vertex index in the range 0 to 3
as an Integer argument and returns True when the specified edge is visible or False when the specified edge
is invisible. For example:
odPrintConsoleString(L"\nEdge(0) is %s", ((pFace->isEdgeVisibleAt(0)) ? L"visible" : L"invisible"));
odPrintConsoleString(L"\nEdge(1) is %s", ((pFace->isEdgeVisibleAt(1)) ? L"visible" : L"invisible"));
odPrintConsoleString(L"\nEdge(2) is %s", ((pFace->isEdgeVisibleAt(2)) ? L"visible" : L"invisible"));
odPrintConsoleString(L"\nEdge(3) is %s", ((pFace->isEdgeVisibleAt(3)) ? L"visible" : L"invisible"));
To switch the edge visibility, use the makeEdgeVisibleAt() method which requires a vertex index in the range 0 to 3
as an Integer argument and makes the specified edge visible or the makeEdgeInvisibleAt() method which requires
a vertex index in the range 0 to 3 as an Integer argument and makes the specified edge invisible. For example: