Polyline2D
Canonical path: NemAll_Python_Geometry.Polyline2D
Bases: PolyPoints2D
Representation class for 2D Polyline.
GetLine
GetLine(index: int) -> Line2D
GetLines
GetLines() -> Line2DList
Get all lines from this polyline
Returns:
-
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:
-
bool
–true if is valid
LineCount
Get the count of lines connecting the points
Returns:
-
int
–count of lines
__eq__
__eq__(polyline2: Polyline2D) -> bool
Equal operator
Parameters:
-
polyline2
(Polyline2D
) –Second polyline
Returns:
-
bool
–Polyline3D are equal
__iadd__
overloaded
__iadd__(polyline: Polyline2D) -> Polyline2D
Addition assignment operator
Parameters:
-
polyline
(Polyline2D
) –Polyline which will be added
Returns:
-
Polyline2D
–Reference to polyline
__iadd__(point: Point2D) -> Polyline2D
Addition assignment operator
Parameters:
-
point
(Point2D
) –New Point2D which will be added to the polyline
Returns:
-
Polyline2D
–Reference to polyline
__init__
overloaded
Initialize
Constructor with an initializer list
Parameters:
-
pntList
(list
) –Point list
__init__(polyline: Polyline2D)
__init__(points: Point2DList)
Vector points constructor.
Parameters:
-
points
(Point2DList
) –Vector of points which will be moved to polyline
__init__(polyline: Polyline2D, skip: int, count: int)
Copy constructor with limited scope
Parameters:
-
polyline
(Polyline2D
) –Polyline which will be copied
-
skip
(int
) –count of points ignored at start.
-
count
(int
) –count of points copied.
__init__(polygon: Polygon2D)
Constructor.
If polygon have two or more components, then constructor throw Geometry exception.
Parameters:
-
polygon
(Polygon2D
) –Polygon2D whose points and reference point will build the new polyline
__ne__
__ne__(polyline2: Polyline2D) -> bool
Not equal operator
Parameters:
-
polyline2
(Polyline2D
) –Second polyline
Returns:
-
bool
–Polyline3D are equal