Skip to content

Spline2D

Class full path: NemAll_Python_Geometry.Spline2D

Bases: PolyPoints2D

Representation class for 2D spline.

Attributes

EndVector: Vector2D property writable

Get end vector.

StartVector: Vector2D property writable

Get start vector.

Functions

GetEndVector()

Get end vector.

Returns:

Type Description
Vector2D

end vector.

GetStartVector()

Get start vector.

Returns:

Type Description
Vector2D

start vector.

IsClosed()

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

Returns:

Type Description
bool

closed spline true/false

Reverse()

Reverse of current spline

Method reverse Spline using reverse from PolyPoints and swapping tangents.

SetEndVector(vec)

Set end vector.

Parameters:

Name Type Description Default
vec Vector2D

new end vector.

required

SetStartVector(vec)

Set start vector.

Parameters:

Name Type Description Default
vec Vector2D

new start vector.

required

__eq__(spline)

Comparison of splines without tolerance.

Be careful, this method work without tolerance!

Parameters:

Name Type Description Default
spline Spline2D

Compared spline.

required

Returns:

Type Description
object

True when splines are equal, otherwise false.

__init__ overload

__init__()

Initialize

__init__(spline)

Copy constructor.

Parameters:

Name Type Description Default
spline Spline2D

Spline which will be copied.

required
__init__(pntList)

Args: pntList:

__mul__(matrix)

Multiple Spline with matrix.

Parameters:

Name Type Description Default
matrix Matrix2D

Transformation matrix.

required

Returns:

Type Description
Spline2D

Transformed spline.

__repr__()

Convert to string