Skip to content

PolygonalArea2D

Canonical path: NemAll_Python_Geometry.PolygonalArea2D

Bases: PolygonalArea

2D polygonal area class for 2D polygonal area geometry

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.

  • SetRefPoint

    Set reference point in world coordinate system.

  • __eq__

    Comparison of polygonalAreas without tolerance.

  • __getitem__

    Get point at position from index. Used world coordinates.

  • __iadd__

    dummy, is only needed for the creation of the documentation by MkDocs

  • __init__

    dummy, is only needed for the creation of the documentation by MkDocs

  • __mul__

    Matrix transformation.

  • __repr__

    Convert the list to a string

Attributes:

  • RefPoint (None) –

    Get and set the reference point in world coordinate system as property

RefPoint property

RefPoint: None

Get and set the reference point in world coordinate system as property

:type: None

AppendRelVertex

AppendRelVertex(vertex: Point2D) -> tuple

Append vertex in local coordinate system.

Warning: method does not update edges.

Parameters:

  • vertex (Point2D) –

    vertex in local coordinate system which will be appended.

Returns:

  • tuple

    Error code.,

  • tuple

    index of vertex

AppendVertex

AppendVertex(vertex: Point2D) -> tuple

Append vertex in World coordinate system.

Warning: method does not update edges.

Parameters:

  • vertex (Point2D) –

    vertex in world coordinate system which will be appended.

Returns:

  • tuple

    Error code.,

  • tuple

    index of vertex

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

Get edge vertices.

Parameters:

  • edgeIndex (int) –

    edge index.

Returns:

  • tuple

    Error code.,

  • tuple

    start point of the edge in world coordinate system.,

  • tuple

    end point of the edge in world coordinate system.

GetPolygon

GetPolygon() -> tuple

Get polygon.

Old interface: pgon_to_punkte

Returns:

GetRefPoint

GetRefPoint() -> Point2D

Get the reference point.

Returns:

  • Point2D

    constant reference to point.

GetRelVertex

GetRelVertex(vertexIndex: int) -> tuple

Get vertex in Local coordinate system.

Parameters:

  • vertexIndex (int) –

    vertex index.

Returns:

  • tuple

    Error code.,

  • tuple

    vertex in local coordinate system.

GetVertex

GetVertex(vertexIndex: int) -> tuple

Get vertex in World coordinate system.

Parameters:

  • vertexIndex (int) –

    vertex index.

Returns:

  • tuple

    Error code.,

  • tuple

    vertex in world coordinate system.

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__(polygonalArea: PolygonalArea2D) -> object

Comparison of polygonalAreas without tolerance.

Be careful, this method work without tolerance!

Parameters:

Returns:

  • object

    True when polygonalAreas 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) -> object

Append polygon.

Parameters:

  • polygonalarea (PolygonalArea2D) –

    polygonal area which will be appended.

Returns:

  • object

    Reference to PolygonalArea2D.

__iadd__(polygon: Polygon2D) -> object

Append loop.

Parameters:

  • polygon (Polygon2D) –

    polygon which will be appended.

Returns:

  • object

    Reference to PolygonalArea2D.

__init__ overloaded

__init__()

Initialize

__init__(verticesCount: int, edgesCount: int)

Default constructor.

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

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

Default constructor.

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

__init__(polygon: PolygonalArea2D)

Copy constructor.

Parameters:

__mul__

__mul__(matrix: Matrix2D) -> object

Matrix transformation.

Parameters:

Returns:

  • object

    Transformed 2D polygonal area.

__repr__

__repr__() -> str

Convert the list to a string

Returns:

  • str

    List values as string