Path2D
Canonical path: NemAll_Python_Geometry.Path2D
Bases: Path
Representation class for 2D path.
EndPoint
property
writable
EndPoint: Point2D
Get path end point
Throw THROW_GEO_EXCEPTION_OUT_OF_RANGE_ if path is empty Throw THROW_GEO_EXCEPTION_GENERAL_ERROR_ if internal error
StartPoint
property
writable
StartPoint: Point2D
Get path start point
Throw THROW_GEO_EXCEPTION_OUT_OF_RANGE_ if path is empty Throw THROW_GEO_EXCEPTION_GENERAL_ERROR_ if internal error
Add
overloaded
Add(element: Path2D) -> eGeometryErrorCode
Add element into path Path2D
Parameters:
-
element
(Path2D
) –Path element to add
Returns:
-
eGeometryErrorCode
–error code
Add(element_object: object) -> eGeometryErrorCode
Add element into path Path2D
Parameters:
-
element_object
(object
) –Pointer to element to add
Returns:
-
eGeometryErrorCode
–error code
GetEndPoint
GetEndPoint() -> Point2D
Get path end point
Throw THROW_GEO_EXCEPTION_OUT_OF_RANGE_ if path is empty Throw THROW_GEO_EXCEPTION_GENERAL_ERROR_ if internal error
Returns:
-
Point2D
–const Point2D End point
GetEndRelPoint
GetEndRelPoint() -> Point2D
GetStartPoint
GetStartPoint() -> Point2D
Get path start point
Throw THROW_GEO_EXCEPTION_OUT_OF_RANGE_ if path is empty Throw THROW_GEO_EXCEPTION_GENERAL_ERROR_ if internal error
Returns:
-
Point2D
–const Point2D Start point
GetStartRelPoint
GetStartRelPoint() -> Point2D
IsClosed
Check for closed path, it mean that first point is same as last point
Returns:
-
bool
–True when path is closed, otherwise false.
IsItPossibleToAddElement
Check if the geometry can be added into path Path2D
Parameters:
-
pGeometry_object
(object
) –Pointer to geometry to check
IsValid
Validity check
warning Path doesn't have to be closed to be valid, you have to check this extra
IsValidCurveType
staticmethod
Check if the geometry is supported by Path2D
Parameters:
-
pGeometry_object
(object
) –Pointer to geometry to check
SetEndPoint
SetEndPoint(endpoint: Point2D)
SetStartPoint
SetStartPoint(startpoint: Point2D)
__eq__
__eq__(path: Path2D) -> object
Comparison of paths without tolerance.
Be careful, this method work without tolerance!
Parameters:
-
path
(Path2D
) –Compared path.
Returns:
-
object
–True when paths are equal, otherwise false.