BSpline2D
Canonical path: NemAll_Python_Geometry.BSpline2D
Bases: PolyPoints2D
class for 2D (non uniform, rational) B-spline geometry
CreateLine2D
staticmethod
Get
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,
)
Set the b-spline 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.
SetKnots
SetKnots(knots: VecDoubleList)
SetPeriodic
Set the periodic flag
Parameters:
-
flag
(bool
) –True if BSpline is periodic
SetWeights
SetWeights(weights: VecDoubleList)
__eq__
__eq__(bspline: BSpline2D) -> bool
Comparison of bsplines.
Be careful, this method work without tolerance!
Parameters:
-
bspline
(BSpline2D
) –bspline to be compared.
Returns:
-
bool
–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)