PolygonalArea
Canonical path: NemAll_Python_Geometry.PolygonalArea
The PolygonalArea class is the base class for PolygonalArea2D and PolygonalArea3D.
Methods:
-
AppendEdge–Append edge (appendPolygonEdge).
-
GetComponentsCount–Get count of components.
-
GetEdge–Get edge.
-
GetEdges–Get copy of all edges.
-
GetEdgesCount–Get count of edges.
-
GetLoopEndEdgeIndex–Get the index of last edge of a loop.
-
GetLoopsCount–Get Count of loops.
-
GetNeighborEdges–Get neighbor edges.
-
GetNextEdge–Get next edge.
-
GetPlane–Get plane if polygon is plane.
-
GetPrevEdge–Get previous edge.
-
GetVector–Get Normal vector if polygon is plane.
-
GetVerticesCount–Get count of vertices.
-
IsValid–Checking validity
-
SetPlane–Set plane.
-
SetVector–Set normal vector.
AppendEdge
AppendEdge(edge: GeometryEdge) -> eGeometryErrorCode
Append edge (appendPolygonEdge).
Parameters:
-
edge(GeometryEdge) –Appended edge.
Returns:
-
eGeometryErrorCode–Error code.
GetComponentsCount
Get count of components.
Returns:
-
int–Count of component.
GetEdge
GetEdge(edgeIndex: int) -> tuple[eGeometryErrorCode, GeometryEdge]
Get edge.
Parameters:
-
edgeIndex(int) –index of the edge.
Returns:
-
tuple[eGeometryErrorCode, GeometryEdge]–tuple(Error code., edge of polygon)
GetEdges
GetEdges() -> tuple[eGeometryErrorCode, list[GeometryEdge]]
Get copy of all edges.
Returns:
-
tuple[eGeometryErrorCode, list[GeometryEdge]]–tuple(Error code., vector of all edges)
GetLoopEndEdgeIndex
Get the index of last edge of a loop.
Parameters:
-
loopIndex(int) –index of loop.
Returns:
-
int–Index of the last edge of the loop identified by the loopIndex value.
GetNeighborEdges
GetNeighborEdges(
edgeIndex: int,
) -> tuple[eGeometryErrorCode, GeometryEdge, GeometryEdge]
Get neighbor edges.
Parameters:
-
edgeIndex(int) –edge index.
Returns:
-
tuple[eGeometryErrorCode, GeometryEdge, GeometryEdge]–tuple(Error code., previous edge (edge which is before edge[index] in the chain), next edge (edge which is after edge[index] in the chain))
GetNextEdge
GetNextEdge(edgeIndex: int) -> tuple[eGeometryErrorCode, GeometryEdge]
Get next edge.
Parameters:
-
edgeIndex(int) –edge index.
Returns:
-
tuple[eGeometryErrorCode, GeometryEdge]–tuple(Error code., next edge (edge which is after edge[index] in the chain))
GetPlane
GetPlane() -> tuple[eGeometryErrorCode, Plane3D]
Get plane if polygon is plane.
Returns:
-
tuple[eGeometryErrorCode, Plane3D]–tuple(Error code., polygon plane)
GetPrevEdge
GetPrevEdge(edgeIndex: int) -> tuple[eGeometryErrorCode, GeometryEdge]
Get previous edge.
Parameters:
-
edgeIndex(int) –edge index.
Returns:
-
tuple[eGeometryErrorCode, GeometryEdge]–tuple(Error code., previous edge (edge which is before edge[index] in the chain))
GetVector
GetVector() -> tuple[eGeometryErrorCode, Vector3D]
Get Normal vector if polygon is plane.
Returns:
-
tuple[eGeometryErrorCode, Vector3D]–tuple(Error code., normal vector to the polygon plane)
SetVector
SetVector(vec: Vector3D) -> eGeometryErrorCode
Set normal vector.
Parameters:
-
vec(Vector3D) –vector which will be set.
Returns:
-
eGeometryErrorCode–Error code.