See also
Methods Signatures
|
|
Returns a string representation of the polygon object.
|
Checks if the polygon is a triangle. |
|
Checks if one of the polygon vertex indices is equal to index and returns the found polygon vertex number (0-3, equals |
|
Checks if the vertex indices index1 and index2 form an edge in this polygon. If so the polygon edge number is returned (0-3). |
|
Retrieves the point indices for edge. |
Methods Documentation
-
CPolygon.
__init__
(self, t_a, t_b, t_c, t_d)¶ - Parameters
t_a (int) – Index of first point in the polygon.
t_b (int) – Index of second point in the polygon.
t_c (int) – Index of third point in the polygon.
t_d (int) – Index of optional fourth point in the polygon.
-
CPolygon.
__str__
(self)¶ - Returns a string representation of the polygon object.Called if str() is invoked on a
CPolygon
object. See object.__str__() for more information on Python’s data model.- Return type
str
- Returns
The string representation of the polygon.
-
CPolygon.
IsTriangle
(self)¶ Checks if the polygon is a triangle.
New in version R16.021.
- Return type
bool
- Returns
True if the polygon is a triangle, otherwise False.
-
CPolygon.
Find
(self, index)¶ Checks if one of the polygon vertex indices is equal to index and returns the found polygon vertex number (0-3, equals
a
-d
).New in version R16.021.
-
CPolygon.
FindEdge
(self, index1, index2)¶ Checks if the vertex indices index1 and index2 form an edge in this polygon. If so the polygon edge number is returned (0-3).
New in version R16.021.
- Parameters
index1 (int) – The vertex index of the first edge point.
index2 (int) – The vertex index of the second edge point.
- Return type
int
- Returns
The found polygon edge number (0-3). NOTOK is returned if there is no match.
-
CPolygon.
EdgePoints
(self, edge)¶ Retrieves the point indices for edge.
New in version R16.021.
- Parameters
edge (int) – The edge index (0-3).
- Return type
Tuple[int, int]
- Returns
The index of the first and second edge point.