PolygonalArea3D
Canonical path: NemAll_Python_Geometry.PolygonalArea3D
Bases: PolygonalArea
Representation class for 3D polygonal area.
Methods:
-
AppendRelVertex–Append vertex in local coordinate system.
-
AppendVertex–Append vertex in World coordinate system.
-
EqualRef–Test for equal reference points.
-
GetEdgeVertices–Get edge vertices.
-
GetPolygon–Get polygon.
-
GetRefPoint–Get the reference point.
-
GetRelVertex–Get vertex in Local coordinate system.
-
GetVertex–Get vertex in World coordinate system.
-
Reverse–Reverse the point order of boundary polygons of the area.
-
SetRefPoint–Set reference point in world coordinate system.
-
SetVertex–Set vertex in World coordinate system.
-
__eq__–Comparison of areas.
-
__getitem__–Get point at position from index. Used world coordinates.
-
__iadd__–Overloaded function. See individual overloads.
-
__init__–Overloaded function. See individual overloads.
-
__mul__–Overloaded function. See individual overloads.
-
__repr__–Convert to string
Attributes:
RefPoint
property
writable
RefPoint: Point3D
Get the reference point.
Coordinates of points will be recalculated with new reference point.
AppendRelVertex
AppendRelVertex(vertex: Point3D) -> tuple[eGeometryErrorCode, int]
Append vertex in local coordinate system.
Parameters:
-
vertex(Point3D) –vertex in local coordinate system which will be appended.
Returns:
-
tuple[eGeometryErrorCode, int]–tuple(Error code., index of vertex)
AppendVertex
AppendVertex(vertex: Point3D) -> tuple[eGeometryErrorCode, int]
Append vertex in World coordinate system.
Parameters:
-
vertex(Point3D) –vertex in world coordinate system which will be appended.
Returns:
-
tuple[eGeometryErrorCode, int]–tuple(Error code., index of vertex)
EqualRef
EqualRef(polygon: PolygonalArea3D) -> bool
Test for equal reference points.
Parameters:
-
polygon(PolygonalArea3D) –polygon for comparision.
Returns:
-
bool–True if reference points are equal else return false.
GetEdgeVertices
GetEdgeVertices(edgeIndex: int) -> tuple[eGeometryErrorCode, Point3D, Point3D]
Get edge vertices.
Old interface: getPolygon2DEdge.
Parameters:
-
edgeIndex(int) –edge index.
Returns:
-
tuple[eGeometryErrorCode, Point3D, Point3D]–tuple(Error code., start point of the edge in world coordinate system, end point of the edge in world coordinate system)
GetPolygon
GetPolygon() -> tuple[eGeometryErrorCode, Polygon3D]
GetRelVertex
GetRelVertex(vertexIndex: int) -> tuple[eGeometryErrorCode, Point3D]
Get vertex in Local coordinate system.
Old interface: getPolygonVertex.
Parameters:
-
vertexIndex(int) –vertex index.
Returns:
-
tuple[eGeometryErrorCode, Point3D]–vertex in local coordinate system
GetVertex
GetVertex(vertexIndex: int) -> tuple[eGeometryErrorCode, Point3D]
Get vertex in World coordinate system.
Old interface: getPolygonVertex.
Parameters:
-
vertexIndex(int) –vertex index.
Returns:
-
tuple[eGeometryErrorCode, Point3D]–tuple(Error code., vertex in world coordinate system)
Reverse
Reverse() -> eGeometryErrorCode
Reverse the point order of boundary polygons of the area.
Old interface: drehePolygonUm.
Returns:
-
eGeometryErrorCode–Error code.
SetRefPoint
SetRefPoint(refPoint: Point3D) -> eGeometryErrorCode
Set reference point in world coordinate system.
Coordinates of points will be recalculated with new reference point.
Parameters:
-
refPoint(Point3D) –new reference point.
SetVertex
SetVertex(vertexIndex: int, vertex: Point3D) -> eGeometryErrorCode
Set vertex in World coordinate system.
Old interface: setPolygonVertex.
Parameters:
-
vertexIndex(int) –vertex index.
-
vertex(Point3D) –vertex in world coordinate system.
Returns:
-
eGeometryErrorCode–Error code.
__eq__
__eq__(area: PolygonalArea3D) -> bool
Comparison of areas.
Be careful, this method work without tolerance!
Parameters:
-
area(PolygonalArea3D) –area to be compared.
Returns:
-
bool–True when areas are equal, otherwise false.
__getitem__
__getitem__(vertexIndex: int) -> Point3D
Get point at position from index. Used world coordinates.
Parameters:
-
vertexIndex(int) –vertex index.
Returns:
-
Point3D–Copy of vertex[vertexIndex] in world coordinates.
__iadd__
overloaded
__iadd__(polygonalarea: PolygonalArea3D) -> PolygonalArea3D
Append polygon.
Old interface: appendPolygonPolygon
Parameters:
-
polygonalarea(PolygonalArea3D) –polygonal area which will be appended.
Returns:
-
PolygonalArea3D–Reference to PolygonalArea3D.
__iadd__(polygon: Polygon3D) -> PolygonalArea3D
Append loop.
Old interface: appendPolygonPolygon
Parameters:
-
polygon(Polygon3D) –polygonal area which will be appended.
Returns:
-
PolygonalArea3D–Reference to PolygonalArea3D.
__init__
overloaded
Initialize
Default constructor.
Create initialized 3D polygonal area with expected vertices and edges count.
Parameters:
-
verticesCount(int) –Vertices count
-
edgesCount(int) –Edges count
__init__(refPoint: Point3D, verticesCount: int, edgesCount: int)
Default constructor.
Create initialized 3D polygonal area with expected vertices and edges count.
Parameters:
-
refPoint(Point3D) –Reference point
-
verticesCount(int) –Vertices count
-
edgesCount(int) –Edges count
__init__(polygon: PolygonalArea3D)
__mul__
overloaded
__mul__(matrix: Matrix2D) -> PolygonalArea3D
2D matrix transformation.
Parameters:
-
matrix(Matrix2D) –2D transformation matrix.
Returns:
-
PolygonalArea3D–Transformed 3D polygon area.
__mul__(matrix: Matrix3D) -> PolygonalArea3D
3D matrix transformation.
Parameters:
-
matrix(Matrix3D) –3D transformation matrix.
Returns:
-
PolygonalArea3D–Transformed 3D polygon area.