Skip to content

PolygonalArea2D

Canonical path: NemAll_Python_Geometry.PolygonalArea2D

Bases: PolygonalArea

Representation class for 2D polygonal area.

RefPoint property writable

RefPoint: Point2D

Get the reference point.

Coordinates of points will be recalculated with new reference point.

AppendRelVertex

AppendRelVertex(vertex: Point2D) -> tuple[eGeometryErrorCode, int]

Append vertex in local coordinate system.

Parameters:

  • vertex (Point2D) –

    vertex in local coordinate system which will be appended.

Returns:

AppendVertex

AppendVertex(vertex: Point2D) -> tuple[eGeometryErrorCode, int]

Append vertex in World coordinate system.

Parameters:

  • vertex (Point2D) –

    vertex in world coordinate system which will be appended.

Returns:

EqualRef

EqualRef(polygon: PolygonalArea2D) -> bool

Test for equal reference points.

Parameters:

Returns:

  • bool

    True if reference points are equal else return false.

GetEdgeVertices

GetEdgeVertices(edgeIndex: int) -> tuple[eGeometryErrorCode, Point2D, Point2D]

Get edge vertices.

Old interface: getPolygon2DEdge.

Parameters:

  • edgeIndex (int) –

    edge index.

Returns:

GetPolygon

Get polygon.

Old interface: pgon_to_punkte

Returns:

GetRefPoint

GetRefPoint() -> Point2D

Get the reference point.

Returns:

GetRelVertex

GetRelVertex(vertexIndex: int) -> tuple[eGeometryErrorCode, Point2D]

Get vertex in Local coordinate system.

Old interface: getPolygonVertex.

Parameters:

  • vertexIndex (int) –

    vertex index.

Returns:

GetVertex

GetVertex(vertexIndex: int) -> tuple[eGeometryErrorCode, Point2D]

Get vertex in World coordinate system.

Old interface: getPolygonVertex.

Parameters:

  • vertexIndex (int) –

    vertex index.

Returns:

SetRefPoint

SetRefPoint(refPoint: Point2D) -> eGeometryErrorCode

Set reference point in world coordinate system.

Coordinates of points will be recalculated with new reference point.

Parameters:

  • refPoint (Point2D) –

    new reference point.

Returns:

__eq__

__eq__(area: PolygonalArea2D) -> bool

Comparison of areas.

Be careful, this method work without tolerance!

Parameters:

Returns:

  • bool

    True when areas are equal, otherwise false.

__getitem__

__getitem__(vertexIndex: int) -> Point2D

Get point at position from index. Used world coordinates.

Parameters:

  • vertexIndex (int) –

    vertex index.

Returns:

  • Point2D

    Copy of vertex[vertexIndex] in world coordinates.

__iadd__ overloaded

__iadd__(polygonalarea: PolygonalArea2D) -> PolygonalArea2D

Append polygon.

Old interface: appendPolygonPolygon.

Parameters:

  • polygonalarea (PolygonalArea2D) –

    polygonal area which will be appended.

Returns:

__iadd__(polygon: Polygon2D) -> PolygonalArea2D

Append loop.

Old interface: appendPolygonPolygon.

Parameters:

  • polygon (Polygon2D) –

    polygon which will be appended.

Returns:

__init__ overloaded

__init__()

Initialize

__init__(verticesCount: int, edgesCount: int)

Default constructor.

Create initialized 2D polygonal area with expected vertices and edges count.

Parameters:

  • verticesCount (int) –

    Vertices count

  • edgesCount (int) –

    Edges count

__init__(refPoint: Point2D, verticesCount: int, edgesCount: int)

Default constructor.

Create initialized 2D polygonal area with expected vertices and edges count.

Parameters:

  • refPoint (Point2D) –

    Reference point

  • verticesCount (int) –

    Vertices count

  • edgesCount (int) –

    Edges count

__init__(polygon: PolygonalArea2D)

Copy constructor.

Parameters:

__mul__

__mul__(matrix: Matrix2D) -> PolygonalArea2D

Matrix transformation.

Parameters:

Returns:

__repr__

__repr__() -> str

Convert to string

Placeholder