Skip to content

Spline2D

Canonical path: NemAll_Python_Geometry.Spline2D

Bases: PolyPoints2D

Representation class for 2D spline.

Methods:

Attributes:

EndVector property writable

EndVector: Vector2D

Get end vector.

StartVector property writable

StartVector: Vector2D

Get start vector.

GetEndVector

GetEndVector() -> Vector2D

Get end vector.

Returns:

GetStartVector

GetStartVector() -> Vector2D

Get start vector.

Returns:

IsClosed

IsClosed() -> bool

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

Returns:

  • bool

    closed spline true/false

Reverse

Reverse()

Reverse of current spline

Method reverse Spline using reverse from PolyPoints and swapping tangents.

SetEndVector

SetEndVector(vec: Vector2D)

Set end vector.

Parameters:

SetStartVector

SetStartVector(vec: Vector2D)

Set start vector.

Parameters:

__eq__

__eq__(spline: Spline2D) -> object

Comparison of splines without tolerance.

Be careful, this method work without tolerance!

Parameters:

  • spline (Spline2D) –

    Compared spline.

Returns:

  • object

    True when splines are equal, otherwise false.

__init__ overloaded

__init__()

Initialize empty spline

__init__(spline: Spline2D)

Copy constructor.

Parameters:

  • spline (Spline2D) –

    Spline which will be copied.

__init__(pntList: List[Point2D])

Default constructor

Parameters:

  • pntList (List[Point2D]) –

    list with control points

__mul__

__mul__(matrix: Matrix2D) -> Spline2D

Multiple Spline with matrix.

Parameters:

  • matrix (Matrix2D) –

    Transformation matrix.

Returns:

__repr__

__repr__() -> str

Convert to string