Skip to content

Path3D

Class full path: NemAll_Python_Geometry.Path3D

Bases: Path

Representation class for 3D path.

Attributes

EndPoint: Point3D property writable

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

Get path start point

Throw THROW_GEO_EXCEPTION_OUT_OF_RANGE_ if path is empty Throw THROW_GEO_EXCEPTION_GENERAL_ERROR_ if internal error

Functions

Add overload

Add(element)

Add element into path Path3D

Parameters:

Name Type Description Default
element Path3D

Path element to add

required

Returns:

Type Description
eGeometryErrorCode

error code

Add(element_object)

Add element into path Path3D

Parameters:

Name Type Description Default
element_object object

Pointer to element to add

required

Returns:

Type Description
eGeometryErrorCode

error code

DefinitionPoints()

Extracts all definition points of the path.

Returns:

Type Description
Polyline3D

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

FirstDefinitionPoint()

Extracts the first definition point of the path.

Returns:

Type Description
Point3D

First definition point of this path as Point3D

GetEndPoint()

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:

Type Description
Point3D

const Point3D End point

GetEndRelPoint()

Get relative end (last) point of the path

Returns:

Type Description
Point3D

End point (relative)

GetStartPoint()

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:

Type Description
Point3D

const Point3D Start point

GetStartRelPoint()

Get relative start (first) point of the path

Returns:

Type Description
Point3D

Start point (relative)

IsClosed()

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

Returns:

Type Description
bool

True when path is closed, otherwise false.

IsItPossibleToAddElement overload

IsItPossibleToAddElement(pGeometry_object)

Check if the geometry can be added into path Path3D

Parameters:

Name Type Description Default
pGeometry_object object

Pointer to geometry to check

required
IsItPossibleToAddElement(pGeometry_object, tolerance)

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

Parameters:

Name Type Description Default
pGeometry_object object

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

required
tolerance float

Tolerance for non continuous geometries

required

Returns:

Type Description
bool

Yes / no

IsValid()

Validity check

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

IsValidCurveType(pGeometry_object) staticmethod

Check if the geometry is supported by Path3D

Parameters:

Name Type Description Default
pGeometry_object object

Pointer to geometry to check

required

SetEndPoint(endpoint)

Set end (last) point of the path

Parameters:

Name Type Description Default
endpoint Point3D

E point

required

Returns:

Type Description

none

SetStartPoint(startpoint)

Set start (first) point of the path

Parameters:

Name Type Description Default
startpoint Point3D

Start point

required

Returns:

Type Description

none

__eq__(path)

Comparison of paths without tolerance.

Be careful, this method work without tolerance!

Parameters:

Name Type Description Default
path Path3D

Compared path.

required

Returns:

Type Description
object

True when paths are equal, otherwise false.

__iadd__ overload

__iadd__(element)

Append operator

Parameters:

Name Type Description Default
element Path3D

Element which will be appended

required

Returns:

Type Description
Path3D

Reference to path.

__iadd__(element)

Append operator

Parameters:

Name Type Description Default
element Line3D

Element which will be appended

required
__iadd__(element)

Append operator

Parameters:

Name Type Description Default
element Polyline3D

Element which will be appended

required
__iadd__(element)

Append operator

Parameters:

Name Type Description Default
element Arc3D

Element which will be appended

required
__iadd__(element)

Append operator

Parameters:

Name Type Description Default
element Spline3D

Element which will be appended

required
__iadd__(element)

Append operator

Parameters:

Name Type Description Default
element BSpline3D

Element which will be appended

required

__init__ overload

__init__()

Initialize

__init__(path)

Copy constructor

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

Parameters:

Name Type Description Default
path Path3D

Path which will be copied.

required
__init__(point1, point2)

Constructor defines a polyline of 2 points as path.

Parameters:

Name Type Description Default
point1 Point3D

First point of the polyline path

required
point2 Point3D

Second point of the polyline path

required
__init__(point1, point2, point3)

Constructor defines a polyline of 3 points as path.

Parameters:

Name Type Description Default
point1 Point3D
  1. point of the polyline path
required
point2 Point3D
  1. point of the polyline path
required
point3 Point3D
  1. point of the polyline path
required
__init__(point1, point2, point3, point4)

Constructor defines a polyline of 4 points as path.

Parameters:

Name Type Description Default
point1 Point3D
  1. point of the polyline path
required
point2 Point3D
  1. point of the polyline path
required
point3 Point3D
  1. point of the polyline path
required
point4 Point3D
  1. point of the polyline path
required
__init__(point1, point2, point3, point4, point5)

Constructor defines a polyline of 5 points as path.

Parameters:

Name Type Description Default
point1 Point3D
  1. point of the polyline path
required
point2 Point3D
  1. point of the polyline path
required
point3 Point3D
  1. point of the polyline path
required
point4 Point3D
  1. point of the polyline path
required
point5 Point3D
  1. point of the polyline path
required

__repr__()

Convert to string