Polygonal Area3D
Class full path: NemAll_Python_Geometry.PolygonalArea3D
Bases: PolygonalArea
3D polygonal area class for 3D polygonal area geometry
Attributes
RefPoint: Point3D
property
Get and set the reference point in world coordinate system as property
Functions
AppendRelVertex(vertex)
Append vertex in local coordinate system.
Warning: method does not update edges.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
vertex
|
Point3D
|
vertex in local coordinate system which will be appended. |
required |
Returns:
Type | Description |
---|---|
eGeometryErrorCode
|
Error code., |
int
|
index of vertex |
AppendVertex(vertex)
Append vertex in World coordinate system.
Warning: method does not update edges.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
vertex
|
Point3D
|
vertex in world coordinate system which will be appended. |
required |
Returns:
Type | Description |
---|---|
eGeometryErrorCode
|
Error code., |
int
|
index of vertex |
EqualRef(polygon)
Test for equal reference points.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
polygon
|
PolygonalArea3D
|
polygonal area for comparision. |
required |
Returns:
Type | Description |
---|---|
bool
|
True if reference points are equal else return false. |
GetEdgeVertices(edgeIndex)
Get edge vertices.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
edgeIndex
|
int
|
edge index. |
required |
Returns:
Type | Description |
---|---|
eGeometryErrorCode
|
Error code., |
Point2D
|
start point of the edge in world coordinate system., |
Point2D
|
end point of the edge in world coordinate system. |
GetPolygon()
Get polygon.
Returns empty polygon, if it has zero edges.
Returns:
Type | Description |
---|---|
eGeometryErrorCode
|
Error code., |
Polygon3D
|
polygon. |
GetRefPoint()
Get the reference point.
Returns:
Type | Description |
---|---|
Point3D
|
constant reference to point. |
GetRelVertex(vertexIndex)
Get vertex in Local coordinate system.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
vertexIndex
|
int
|
vertex index. |
required |
Returns:
Type | Description |
---|---|
Tuple[eGeometryErrorCode, Point3D]
|
vertex in local coordinate system. |
GetVertex(vertexIndex)
Get vertex in World coordinate system.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
vertexIndex
|
int
|
vertex index. |
required |
Returns:
Type | Description |
---|---|
eGeometryErrorCode
|
Error code., |
Point3D
|
vertex in world coordinate system. |
Reverse()
Reverse the point order of boundary polygons of the area.
Returns:
Type | Description |
---|---|
eGeometryErrorCode
|
Error code. |
SetRefPoint(refPoint)
Set reference point in world coordinate system.
Coordinates of points will be recalculated with new reference point.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
refPoint
|
Point3D
|
new reference point. |
required |
Returns:
Type | Description |
---|---|
eGeometryErrorCode
|
Error code. |
__eq__(polygonalArea)
Comparison of polygonalAreas without tolerance.
Be careful, this method work without tolerance!
Parameters:
Name | Type | Description | Default |
---|---|---|---|
polygonalArea
|
PolygonalArea3D
|
Compared polygonalArea. |
required |
Returns:
Type | Description |
---|---|
bool
|
True when polygonalAreas are equal, otherwise false. |
__getitem__(vertexIndex)
Get point at position from index. Used world coordinates.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
vertexIndex
|
int
|
vertex index. |
required |
Returns:
Type | Description |
---|---|
Point3D
|
Copy of vertex[vertexIndex] in world coordinates. |
__iadd__
overload
__iadd__(polygonalarea)
Append polygon.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
polygonalarea
|
PolygonalArea3D
|
polygonal area which will be appended. |
required |
Returns:
Type | Description |
---|---|
object
|
Reference to PolygonalArea3D. |
__iadd__(polygon)
Append loop.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
polygon
|
Polygon3D
|
polygonal area which will be appended. |
required |
Returns:
Type | Description |
---|---|
object
|
Reference to PolygonalArea3D. |
__init__
overload
__init__()
initialize
__init__(verticesCount, edgesCount)
Default constructor.
Create initialized 3D polygonal area with expected vertices and edges count.
__init__(refPoint, verticesCount, edgesCount)
Default constructor.
Create initialized 3D polygonal area with expected vertices and edges count.
__init__(polygon)
Copy constructor.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
polygon
|
PolygonalArea3D
|
3D polygonal area which will be copied. |
required |
__mul__
overload
__mul__(matrix)
2D matrix transformation.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
matrix
|
Matrix2D
|
2D transformation matrix. |
required |
Returns:
Type | Description |
---|---|
object
|
Transformed 3D polygon area. |
__mul__(matrix)
3D matrix transformation.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
matrix
|
Matrix3D
|
3D transformation matrix. |
required |
Returns:
Type | Description |
---|---|
object
|
Transformed 3D polygon area. |
__repr__()
convert the list to a string