BSpline2D
Canonical path: NemAll_Python_Geometry.BSpline2D
Bases: PolyPoints2D
class for 2D (non uniform, rational) B-spline geometry
CreateLine2D
staticmethod
Get
Return type: tuple(list(Point2D), list(float), list(float), int, bool)
GetKnots
GetKnots() -> VecDoubleList
GetWeights
GetWeights() -> VecDoubleList
IsClosed
Check if spline is closed ( first/last points are equal )
Returns:
-
bool
–closed spline true/false
IsRational
Check if the spline is rational
Returns:
-
bool
–bool true = rational
Reverse
Reverse of current spline
Method reverse Spline using reverse from PolyPoints and swapping tangents.
Set
Set(
points: Point2DList,
weights: VecDoubleList,
knots: VecDoubleList,
degree: int,
isPeriodic: bool,
)
Get/Set functions
SetKnots
SetKnots(knots: VecDoubleList)
SetPeriodic
Set the periodic flag
Parameters:
-
flag
–True if BSpline is periodic
SetWeights
SetWeights(weights: VecDoubleList)
__eq__
__eq__(bspline: BSpline2D) -> object
Comparison of bsplines without tolerance.
Be careful, this method work without tolerance!
Parameters:
-
bspline
(BSpline2D
) –Compared bspline.
Returns:
-
object
–True when bsplines are equal, otherwise false.
__init__
overloaded
Initialize
__init__(
points: Point2DList,
weights: VecDoubleList,
knots: VecDoubleList,
degree: int,
isPeriodic: bool,
)
Constructor from b-spline data. Creates b-spline using provided data.
Parameters:
-
points
(Point2DList
) –control points of b-spline.
-
weights
(VecDoubleList
) –weights of b-spline.
-
knots
(VecDoubleList
) –knots of b-spline.
-
degree
(int
) –degree of b-spline.
-
isPeriodic
(bool
) –flag of periodicity of b-spline.
__init__(spline: BSpline2D)