Skip to content

Polygonal Area2D

Class full path: NemAll_Python_Geometry.PolygonalArea2D

Bases: PolygonalArea

2D polygonal area class for 2D polygonal area geometry

Attributes

RefPoint: Point2D 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 Point2D

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 Point2D

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 PolygonalArea2D

polygon 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.

Old interface: pgon_to_punkte

Returns:

Type Description
eGeometryErrorCode

Error code.,

Polygon3D

polygon.

GetRefPoint()

Get the reference point.

Returns:

Type Description
Point2D

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
eGeometryErrorCode

Error code.,

Point2D

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.,

Point2D

vertex in world coordinate system.

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 Point2D

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 PolygonalArea2D

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
Point2D

Copy of vertex[vertexIndex] in world coordinates.

__iadd__ overload

__iadd__(polygonalarea)

Append polygon.

Parameters:

Name Type Description Default
polygonalarea PolygonalArea2D

polygonal area which will be appended.

required

Returns:

Type Description
object

Reference to PolygonalArea2D.

__iadd__(polygon)

Append loop.

Parameters:

Name Type Description Default
polygon Polygon2D

polygon which will be appended.

required

Returns:

Type Description
object

Reference to PolygonalArea2D.

__init__ overload

__init__()

initialize

__init__(verticesCount, edgesCount)

Default constructor.

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

__init__(refPoint, verticesCount, edgesCount)

Default constructor.

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

__init__(polygon)

Copy constructor.

Parameters:

Name Type Description Default
polygon PolygonalArea2D

2D polygon which will be copied.

required

__mul__(matrix)

Matrix transformation.

Parameters:

Name Type Description Default
matrix Matrix2D

point index.

required

Returns:

Type Description
object

Transformed 2D polygonal area.

__repr__()

convert the list to a string