Skip to content

Path3D

Canonical path: NemAll_Python_Geometry.Path3D

Bases: Path

Representation class for 3D path.

Methods:

  • Add

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

  • DefinitionPoints

    Extracts all definition points of the path.

  • FirstDefinitionPoint

    Extracts the first definition point of the path.

  • GetEndPoint

    Get path end point

  • GetEndRelPoint

    Get relative end (last) point of the path

  • GetStartPoint

    Get path start point

  • GetStartRelPoint

    Get relative start (first) point of the path

  • IsClosed

    Check for closed path, it mean that first point is same as last point

  • IsItPossibleToAddElement

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

  • IsValid

    Validity check

  • IsValidCurveType

    Check if the geometry is supported by Path3D

  • SetEndPoint

    Set end (last) point of the path

  • SetStartPoint

    Set start (first) point of the path

  • __eq__

    Comparison of paths without tolerance.

  • __iadd__

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

  • __init__

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

  • __repr__

    Convert to string

Attributes:

EndPoint property writable

EndPoint: Point3D

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: Point3D

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: Path3D) -> eGeometryErrorCode

Add element into path Path3D

Parameters:

  • element (Path3D) –

    Path element to add

Returns:

Add(element_object: object) -> eGeometryErrorCode

Add element into path Path3D

Parameters:

  • element_object (object) –

    Pointer to element to add

Returns:

DefinitionPoints

DefinitionPoints() -> Polyline3D

Extracts all definition points of the path.

Returns:

  • Polyline3D

    All definition points ( join points of sub curves in this path ) of this path as Polyline3D

FirstDefinitionPoint

FirstDefinitionPoint() -> Point3D

Extracts the first definition point of the path.

Returns:

  • Point3D

    First definition point of this path as Point3D

GetEndPoint

GetEndPoint() -> Point3D

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:

  • Point3D

    const Point3D End point

GetEndRelPoint

GetEndRelPoint() -> Point3D

Get relative end (last) point of the path

Returns:

GetStartPoint

GetStartPoint() -> Point3D

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:

  • Point3D

    const Point3D Start point

GetStartRelPoint

GetStartRelPoint() -> Point3D

Get relative start (first) point of the path

Returns:

  • Point3D

    Start point (relative)

IsClosed

IsClosed() -> bool

Check for closed path, it mean that first point is same as last point

Returns:

  • bool

    True when path is closed, otherwise false.

IsItPossibleToAddElement overloaded

IsItPossibleToAddElement(pGeometry_object: object) -> bool

Check if the geometry can be added into path Path3D

Parameters:

  • pGeometry_object (object) –

    Pointer to geometry to check

IsItPossibleToAddElement(pGeometry_object: object, tolerance: float) -> bool

Check if the geometry can be added into path Path3D (with possible noncontinuous)

Parameters:

  • pGeometry_object (object) –

    Geometries (are modified in case of non continuos geometries!)

  • tolerance (float) –

    Tolerance for non continuous geometries

Returns:

  • bool

    Yes / no

IsValid

IsValid() -> bool

Validity check

\warning Path doesn't have to be closed to be valid, you have to check this extra

IsValidCurveType staticmethod

IsValidCurveType(pGeometry_object: object) -> bool

Check if the geometry is supported by Path3D

Parameters:

  • pGeometry_object (object) –

    Pointer to geometry to check

SetEndPoint

SetEndPoint(endpoint: Point3D)

Set end (last) point of the path

Parameters:

Returns:

  • none

SetStartPoint

SetStartPoint(startpoint: Point3D)

Set start (first) point of the path

Parameters:

  • startpoint (Point3D) –

    Start point

Returns:

  • none

__eq__

__eq__(path: Path3D) -> object

Comparison of paths without tolerance.

Be careful, this method work without tolerance!

Parameters:

  • path (Path3D) –

    Compared path.

Returns:

  • object

    True when paths are equal, otherwise false.

__iadd__ overloaded

__iadd__(element: Path3D) -> Path3D

Append operator

Parameters:

  • element (Path3D) –

    Element which will be appended

Returns:

  • Path3D

    Reference to path.

__iadd__(element: Line3D) -> Path3D

Append operator

Parameters:

  • element (Line3D) –

    Element which will be appended

__iadd__(element: Polyline3D) -> Path3D

Append operator

Parameters:

  • element (Polyline3D) –

    Element which will be appended

__iadd__(element: Arc3D) -> Path3D

Append operator

Parameters:

  • element (Arc3D) –

    Element which will be appended

__iadd__(element: Spline3D) -> Path3D

Append operator

Parameters:

  • element (Spline3D) –

    Element which will be appended

__iadd__(element: BSpline3D) -> Path3D

Append operator

Parameters:

  • element (BSpline3D) –

    Element which will be appended

__init__ overloaded

__init__()

Initialize

__init__(path: Path3D)

Copy constructor

Copy constructor is expensive because all data are cloned in new path.

Parameters:

  • path (Path3D) –

    Path which will be copied.

__init__(point1: Point3D, point2: Point3D)

Constructor defines a polyline of 2 points as path.

Parameters:

  • point1 (Point3D) –

    First point of the polyline path

  • point2 (Point3D) –

    Second point of the polyline path

__init__(point1: Point3D, point2: Point3D, point3: Point3D)

Constructor defines a polyline of 3 points as path.

Parameters:

  • point1 (Point3D) –
    1. point of the polyline path
  • point2 (Point3D) –
    1. point of the polyline path
  • point3 (Point3D) –
    1. point of the polyline path
__init__(point1: Point3D, point2: Point3D, point3: Point3D, point4: Point3D)

Constructor defines a polyline of 4 points as path.

Parameters:

  • point1 (Point3D) –
    1. point of the polyline path
  • point2 (Point3D) –
    1. point of the polyline path
  • point3 (Point3D) –
    1. point of the polyline path
  • point4 (Point3D) –
    1. point of the polyline path
__init__(
    point1: Point3D,
    point2: Point3D,
    point3: Point3D,
    point4: Point3D,
    point5: Point3D,
)

Constructor defines a polyline of 5 points as path.

Parameters:

  • point1 (Point3D) –
    1. point of the polyline path
  • point2 (Point3D) –
    1. point of the polyline path
  • point3 (Point3D) –
    1. point of the polyline path
  • point4 (Point3D) –
    1. point of the polyline path
  • point5 (Point3D) –
    1. point of the polyline path

__repr__

__repr__() -> str

Convert to string