Poly Points3D
Class full 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.
Attributes
EndPoint: Point3D
property
writable
Get the end point in world coordinate system.
EndRelPoint: Point3D
property
Get the end point
Points: list[Point3D]
property
writable
Get the point list
RefPoint: Point3D
property
writable
Get reference point.
StartPoint: Point3D
property
writable
Get the start point in world coordinate system.
StartRelPoint: Point3D
property
Get the start point
Functions
Clear()
Remove all points from vector.
Count()
Get count of points.
Returns:
Type | Description |
---|---|
int
|
bool. |
Empty()
Return true if no points, otherwise false.
Returns:
Type | Description |
---|---|
bool
|
bool. |
EqualRef(polyPoints)
Test if reference points are equal.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
polyPoints
|
PolyPoints3D
|
constant the PolyPoints. |
required |
Returns:
Type | Description |
---|---|
bool
|
Reference points are equal: true/false |
GetEndPoint()
Get the end point in world coordinate system.
Returns:
Type | Description |
---|---|
Point3D
|
end point in world coordinate system |
GetEndRelPoint()
Get the end point
Returns:
Type | Description |
---|---|
Point3D
|
end point |
GetLastPoint()
Get the last point in world coordinate system, data.
Returns:
Type | Description |
---|---|
Point3D
|
last point in world coordinate system |
GetPoint(index)
Get point in world coordinate system, data.
This method is checked and throwing Geometry::Exception when index is out of range.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
index
|
int
|
point index. |
required |
Returns:
Type | Description |
---|---|
Point3D
|
point point in world coordinate system. |
GetPointIndex(point)
Get index of the given point
Parameters:
Name | Type | Description | Default |
---|---|---|---|
point
|
Point3D
|
Searched point |
required |
Returns:
Type | Description |
---|---|
bool
|
tuple(True if a point was found, |
int
|
Found index) |
GetPointIndexes(point)
Get indexes of the given point, in case that several points in the spline will have the same coordinates
Parameters:
Name | Type | Description | Default |
---|---|---|---|
point
|
Point3D
|
Searched point |
required |
Returns:
Type | Description |
---|---|
bool
|
tuple(True if at least one point was found, |
list[int]
|
Found indexes) |
GetRefPoint()
Get reference point.
Returns:
Type | Description |
---|---|
Point3D
|
constant the reference point in the world coordinate system. |
GetRelPoint(index)
Get point in Local coordinate system, no data.
This method is checked and throwing Geometry::Exception when index is out of range.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
index
|
int
|
point index. |
required |
Returns:
Type | Description |
---|---|
Point3D
|
point constant the point at position index. |
GetStartPoint()
Get the start point in world coordinate system.
Returns:
Type | Description |
---|---|
Point3D
|
start point in world coordinate system |
GetStartRelPoint()
Get the start point
Returns:
Type | Description |
---|---|
Point3D
|
start point |
Insert
overload
Insert(polyPoints, position=18446744073709551615)
Insert vector of points at specific position.
If return false then points weren't inserted.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
polyPoints
|
PolyPoints3D
|
constant the PolyPoints. |
required |
position
|
int
|
position where points will be inserted. |
18446744073709551615
|
Returns:
Type | Description |
---|---|
bool
|
bool true if successful. |
Insert(point, position=18446744073709551615)
Insert point at specific position. Used world coordinates.
If return false then points weren't Inserted.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
point
|
Point3D
|
constant the Point. |
required |
position
|
int
|
position where points will be inserted. |
18446744073709551615
|
Returns:
Type | Description |
---|---|
bool
|
bool true if successful. |
InsertRel(point, position=18446744073709551615)
Insert relative point at specific position. Used local coordinates.
If return false then points weren't Inserted.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
point
|
Point3D
|
constant the Point. |
required |
position
|
int
|
position where points will be inserted. |
18446744073709551615
|
Returns:
Type | Description |
---|---|
bool
|
bool true if successful. |
Remove(position)
Remove point from specific position.
If return false then points weren't removed.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
position
|
int
|
position of point which will be removed. |
required |
Returns:
Type | Description |
---|---|
bool
|
Point removed: true/false |
RemoveLastPoint()
Remove the last point
Returns:
Type | Description |
---|---|
bool
|
Point removed: true/false |
Reserve(newCount)
Reserve container capacity
Parameters:
Name | Type | Description | Default |
---|---|---|---|
newCount
|
int
|
Expected size of container [count of points] |
required |
Resize(newSize)
Specifies a new size for the points vector.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
newSize
|
int
|
The new size of the points vector. |
required |
Reverse()
Reverse the point order
SetEndPoint(endpoint)
Set the end point in world coordinates
Parameters:
Name | Type | Description | Default |
---|---|---|---|
endpoint
|
Point3D
|
new end point |
required |
SetPoint(point, index)
Set point at given position in world coordinate system.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
point
|
Point3D
|
point in the world coordinate system. |
required |
index
|
int
|
index of point which will be set |
required |
SetRefPoint(refPoint)
Set reference point in world coordinate system.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
refPoint
|
Point3D
|
reference point in the world coordinate system. |
required |
SetRelPoint(point, index)
Set point at given position in relative coordinate system.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
point
|
Point3D
|
point in the relative coordinate system. |
required |
index
|
int
|
index of point which will be set |
required |
SetStartPoint(startpoint)
Set the start point in world coordinates
Parameters:
Name | Type | Description | Default |
---|---|---|---|
startpoint
|
Point3D
|
new start point |
required |
ToLineChain()
Get polyline as a chain of lines composed from 2 points.
Returns:
Type | Description |
---|---|
Point3DList
|
vector of lines composed from 2 points (start and end point of a line) |
__getitem__(index)
Get point at position from index. Used world coordinates.
This method is checked and throwing Geometry::Exception when index is out of range.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
index
|
int
|
point index. |
required |
Returns:
Type | Description |
---|---|
Point3D
|
point. |
__iadd__(point)
Add point in world coordinates.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
point
|
Point3D
|
adding point. |
required |
Returns:
Type | Description |
---|---|
PolyPoints3D
|
New point |
__mul__(matrix)
2D matrix transformation
Parameters:
Name | Type | Description | Default |
---|---|---|---|
matrix
|
Matrix2D
|
2D transformation matrix |
required |
Returns:
Type | Description |
---|---|
PolyPoints3D
|
Transformed polyline |
__setitem__(arg2, value)
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