Skip to content

Spline3D

Canonical path: NemAll_Python_Geometry.Spline3D

Bases: PolyPoints3D

class for 3D spline geometry

Methods:

Attributes:

EndVector property writable

EndVector: Vector3D

Get end vector.

IsPeriodic property writable

IsPeriodic: bool

Check if spline is periodic ( first/last points are equal + start and end tangents are equal)

StartVector property writable

StartVector: Vector3D

Get start vector.

CalculateEndVector

CalculateEndVector() -> Vector3D

Calculates end vector

Returns:

CalculatePoint overloaded

CalculatePoint(param: float) -> Point3D

Calculates point on spline

Parameters:

  • param (float) –

    parameter of spline.

Returns:

CalculatePoint(param: float, cpoints: Point3DList) -> Point3D

Calculates point on spline

Parameters:

  • param (float) –

    parameter of spline.

  • cpoints (Point3DList) –

    control points of spline.

Returns:

CalculateStartVector

CalculateStartVector() -> Vector3D

Calculates start vector

Returns:

CreateClosedSpline staticmethod

CreateClosedSpline(points: Point3DList) -> Spline3D

Create closed spline from given points

Parameters:

Returns:

GetControlPoints

GetControlPoints() -> tuple[GeoErrorCode, list[Point3D]]

Compute bezier control points

Returns:

  • tuple[GeoErrorCode, list[Point3D]]

    tuple(error code, vector of control points)

GetEndVector

GetEndVector() -> Vector3D

Get end vector.

Returns:

GetStartVector

GetStartVector() -> Vector3D

Get start vector.

Returns:

IsClosed

IsClosed() -> bool

Check if spline is closed ( first/last points are equal )

Returns:

  • bool

    closed spline true/false

IsCollinear

IsCollinear() -> bool

Function checks if the 3D spline is collinear - all control points are on same line

Returns:

  • bool

    true if collinear

IsPlanar

IsPlanar() -> tuple[bool, Plane3D]

Function checks if the 3D spline is planar, if yes sets the plane

Returns:

  • tuple[bool, Plane3D]

    tuple(true if planar, the plane the spline is laying on)

Reverse

Reverse()

Reverse of current spline

Method reverse Spline using reverse from PolyPoints and swapping tangents.

SetEndVector

SetEndVector(vec: Vector3D)

Set end vector.

Parameters:

SetStartVector

SetStartVector(vec: Vector3D)

Set start vector.

Parameters:

__eq__

__eq__(spline: Spline3D) -> object

Comparison of splines without tolerance.

Be careful, this method work without tolerance!

Parameters:

  • spline (Spline3D) –

    Compared spline.

Returns:

  • object

    True when splines are equal, otherwise false.

__iadd__

__iadd__(point: Point3D) -> Spline3D

Addition assignment operator

Parameters:

  • point (Point3D) –

    New Point3D which will be added to the spline

Returns:

__init__ overloaded

__init__()

Initialize

__init__(splinePoints: list)

constructor.

__init__(spline: Spline3D)

Copy constructor.

Parameters:

  • spline (Spline3D) –

    Spline which will be copied.

__init__(spline: Spline2D, zPlane: float)

Copy constructor.

Parameters:

  • spline (Spline2D) –

    Spline which will be copied.

  • zPlane (float) –

    Z plane for the spline

__repr__

__repr__() -> str

Convert to string