Skip to content

PolyPoints3D

Canonical path: NemAll_Python_Geometry.PolyPoints3D

The PolyPoints class is the base template class for all objects which store geometry as a vector of points (or another objects), specially for polyline, polygon and spline.

Methods:

  • Clear

    Remove all points from vector.

  • Count

    Get count of points.

  • Empty

    Return true if no points, otherwise false.

  • EqualRef

    Test if reference points are equal.

  • GetEndPoint

    Get the end point in world coordinate system.

  • GetEndRelPoint

    Get the end point

  • GetLastPoint

    Get the last point in world coordinate system, data.

  • GetPoint

    Get point in world coordinate system, data.

  • GetPointIndex

    Get index of the given point

  • GetPointIndexes

    Get indexes of the given point, in case that several points in the spline

  • GetRefPoint

    Get reference point.

  • GetRelPoint

    Get point in Local coordinate system, no data.

  • GetStartPoint

    Get the start point in world coordinate system.

  • GetStartRelPoint

    Get the start point

  • Insert

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

  • InsertRel

    Insert relative point at specific position. Used local coordinates.

  • Remove

    Remove point from specific position.

  • RemoveLastPoint

    Remove the last point

  • Reserve

    Reserve container capacity

  • Resize

    Specifies a new size for the points vector.

  • Reverse

    Reverse the point order

  • SetEndPoint

    Set the end point in world coordinates

  • SetPoint

    Set point at given position in world coordinate system.

  • SetRefPoint

    Set reference point in world coordinate system.

  • SetRelPoint

    Set point at given position in relative coordinate system.

  • SetStartPoint

    Set the start point in world coordinates

  • ToLineChain

    Get polyline as a chain of lines composed from 2 points.

  • __getitem__

    Get point at position from index. Used world coordinates.

  • __iadd__

    Add point in world coordinates.

  • __mul__

    2D matrix transformation

  • __setitem__

    Set point at position from index. Used world coordinates.

Attributes:

EndPoint property writable

EndPoint: Point3D

Get the end point in world coordinate system.

EndRelPoint property

EndRelPoint: Point3D

Get the end point

Points property writable

Points: list[Point3D]

Get the point list

RefPoint property writable

RefPoint: Point3D

Get reference point.

StartPoint property writable

StartPoint: Point3D

Get the start point in world coordinate system.

StartRelPoint property

StartRelPoint: Point3D

Get the start point

Clear

Clear()

Remove all points from vector.

Count

Count() -> int

Get count of points.

Returns:

  • int

    bool.

Empty

Empty() -> bool

Return true if no points, otherwise false.

Returns:

  • bool

    bool.

EqualRef

EqualRef(polyPoints: PolyPoints3D) -> bool

Test if reference points are equal.

Parameters:

Returns:

  • bool

    Reference points are equal: true/false

GetEndPoint

GetEndPoint() -> Point3D

Get the end point in world coordinate system.

Returns:

  • Point3D

    end point in world coordinate system

GetEndRelPoint

GetEndRelPoint() -> Point3D

Get the end point

Returns:

GetLastPoint

GetLastPoint() -> Point3D

Get the last point in world coordinate system, data.

Returns:

  • Point3D

    last point in world coordinate system

GetPoint

GetPoint(index: int) -> Point3D

Get point in world coordinate system, data.

This method is checked and throwing Geometry::Exception when index is out of range.

Parameters:

  • index (int) –

    point index.

Returns:

  • Point3D

    point point in world coordinate system.

GetPointIndex

GetPointIndex(point: Point3D) -> tuple[bool, int]

Get index of the given point

Parameters:

  • point (Point3D) –

    Searched point

Returns:

  • tuple[bool, int]

    tuple(True if a point was found, Found index)

GetPointIndexes

GetPointIndexes(point: Point3D) -> tuple[bool, list[int]]

Get indexes of the given point, in case that several points in the spline will have the same coordinates

Parameters:

  • point (Point3D) –

    Searched point

Returns:

  • tuple[bool, list[int]]

    tuple(True if at least one point was found, Found indexes)

GetRefPoint

GetRefPoint() -> Point3D

Get reference point.

Returns:

  • Point3D

    constant the reference point in the world coordinate system.

GetRelPoint

GetRelPoint(index: int) -> Point3D

Get point in Local coordinate system, no data.

This method is checked and throwing Geometry::Exception when index is out of range.

Parameters:

  • index (int) –

    point index.

Returns:

  • Point3D

    point constant the point at position index.

GetStartPoint

GetStartPoint() -> Point3D

Get the start point in world coordinate system.

Returns:

  • Point3D

    start point in world coordinate system

GetStartRelPoint

GetStartRelPoint() -> Point3D

Get the start point

Returns:

Insert overloaded

Insert(polyPoints: PolyPoints3D, position: int = 18446744073709551615) -> bool

Insert vector of points at specific position.

If return false then points weren't inserted.

Parameters:

  • polyPoints (PolyPoints3D) –

    constant the PolyPoints.

  • position (int, default: 18446744073709551615 ) –

    position where points will be inserted.

Returns:

  • bool

    bool true if successful.

Insert(point: Point3D, position: int = 18446744073709551615) -> bool

Insert point at specific position. Used world coordinates.

If return false then points weren't Inserted.

Parameters:

  • point (Point3D) –

    constant the Point.

  • position (int, default: 18446744073709551615 ) –

    position where points will be inserted.

Returns:

  • bool

    bool true if successful.

InsertRel

InsertRel(point: Point3D, position: int = 18446744073709551615) -> bool

Insert relative point at specific position. Used local coordinates.

If return false then points weren't Inserted.

Parameters:

  • point (Point3D) –

    constant the Point.

  • position (int, default: 18446744073709551615 ) –

    position where points will be inserted.

Returns:

  • bool

    bool true if successful.

Remove

Remove(position: int) -> bool

Remove point from specific position.

If return false then points weren't removed.

Parameters:

  • position (int) –

    position of point which will be removed.

Returns:

  • bool

    Point removed: true/false

RemoveLastPoint

RemoveLastPoint() -> bool

Remove the last point

Returns:

  • bool

    Point removed: true/false

Reserve

Reserve(newCount: int)

Reserve container capacity

Parameters:

  • newCount (int) –

    Expected size of container [count of points]

Resize

Resize(newSize: int)

Specifies a new size for the points vector.

Parameters:

  • newSize (int) –

    The new size of the points vector.

Reverse

Reverse()

Reverse the point order

SetEndPoint

SetEndPoint(endpoint: Point3D)

Set the end point in world coordinates

Parameters:

  • endpoint (Point3D) –

    new end point

SetPoint

SetPoint(point: Point3D, index: int)

Set point at given position in world coordinate system.

Parameters:

  • point (Point3D) –

    point in the world coordinate system.

  • index (int) –

    index of point which will be set

SetRefPoint

SetRefPoint(refPoint: Point3D)

Set reference point in world coordinate system.

Parameters:

  • refPoint (Point3D) –

    reference point in the world coordinate system.

SetRelPoint

SetRelPoint(point: Point3D, index: int)

Set point at given position in relative coordinate system.

Parameters:

  • point (Point3D) –

    point in the relative coordinate system.

  • index (int) –

    index of point which will be set

SetStartPoint

SetStartPoint(startpoint: Point3D)

Set the start point in world coordinates

Parameters:

  • startpoint (Point3D) –

    new start point

ToLineChain

ToLineChain() -> Point3DList

Get polyline as a chain of lines composed from 2 points.

Returns:

  • Point3DList

    vector of lines composed from 2 points (start and end point of a line)

__getitem__

__getitem__(index: int) -> Point3D

Get point at position from index. Used world coordinates.

This method is checked and throwing Geometry::Exception when index is out of range.

Parameters:

  • index (int) –

    point index.

Returns:

__iadd__

__iadd__(point: Point3D) -> PolyPoints3D

Add point in world coordinates.

Parameters:

  • point (Point3D) –

    adding point.

Returns:

__mul__

__mul__(matrix: Matrix2D) -> PolyPoints3D

2D matrix transformation

Parameters:

  • matrix (Matrix2D) –

    2D transformation matrix

Returns:

__setitem__

__setitem__(arg2: int, value: Point3D)

Set point at position from index. Used world coordinates.

This method is checked and throwing Geometry::Exception when index is out of range. Args: index: Specified position pnt: Point