Polyline2D
Class full path: NemAll_Python_Geometry.Polyline2D
Bases: PolyPoints2D
Representation class for 2D Polyline.
Functions
GetLine(index)
Extract a line
Parameters:
Name | Type | Description | Default |
---|---|---|---|
index
|
int
|
Index of the line |
required |
Returns:
Type | Description |
---|---|
Line2D
|
Line from the index |
GetLines()
Get all lines from this polyline
Returns:
Type | Description |
---|---|
Line2DList
|
count of extracted lines, |
Line2DList
|
Vector of extracted lines |
IsValid()
Check if the polygon is valid ( has at least 2 points )
For additional point validation use Service::Validate.
Returns:
Type | Description |
---|---|
bool
|
true if is valid |
LineCount()
Get the count of lines connecting the points
Returns:
Type | Description |
---|---|
int
|
count of lines |
Reverse()
Reverse orientation of the Polyline
__eq__(polyline2)
Equal operator
Parameters:
Name | Type | Description | Default |
---|---|---|---|
polyline2
|
Polyline2D
|
Second polyline |
required |
Returns:
Type | Description |
---|---|
bool
|
Polyline3D are equal |
__iadd__
overload
__iadd__(polyline)
Addition assignment operator
Parameters:
Name | Type | Description | Default |
---|---|---|---|
polyline
|
Polyline2D
|
Polyline which will be added |
required |
Returns:
Type | Description |
---|---|
Polyline2D
|
Reference to polyline |
__iadd__(point)
Addition assignment operator
Parameters:
Name | Type | Description | Default |
---|---|---|---|
point
|
Point2D
|
New Point2D which will be added to the polyline |
required |
Returns:
Type | Description |
---|---|
Polyline2D
|
Reference to polyline |
__init__
overload
__init__()
initialize
__init__(pntList)
Constructor with an initializer list
Parameters:
Name | Type | Description | Default |
---|---|---|---|
pntList
|
List
|
Point list |
required |
__init__(polyline)
Copy constructor.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
polyline
|
Polyline2D
|
Polyline which will be copied |
required |
__init__(points)
Vector points constructor.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
points
|
Point2DList
|
Vector of points which will be moved to polyline |
required |
__init__(polyline, skip, count)
Copy constructor with limited scope
Parameters:
Name | Type | Description | Default |
---|---|---|---|
polyline
|
Polyline2D
|
Polyline which will be copied |
required |
skip
|
int
|
count of points ignored at start. |
required |
count
|
int
|
count of points copied. |
required |
__init__(polygon)
Constructor.
If polygon have two or more components, then constructor throw Geometry exception.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
polygon
|
Polygon2D
|
Polygon2D whose points and reference point will build the new polyline |
required |
__ne__(polyline2)
Not equal operator
Parameters:
Name | Type | Description | Default |
---|---|---|---|
polyline2
|
Polyline2D
|
Second polyline |
required |
Returns:
Type | Description |
---|---|
bool
|
Polyline3D are equal |
__repr__()
Convert to string