-
Notifications
You must be signed in to change notification settings - Fork 0
Bspline
Stephen S. Mitchell edited this page Sep 23, 2025
·
2 revisions
← Back to Classes | Documentation Home | All Classes
- Namespace:
AlibreScript.API - Kind:
Class
Type: Object
The control points [x1, y1, ..., xn, yn]
Type: Object
True if the bspline is a reference bspline, false if it is a regular bspline
Type: Object
The knot vectors [k1, k2, ..., kn]
Type: Object
Gets the length of the Bspline
Type: Object
The order of the bspline
Type: Object
The weights [w1, w2, ..., wn]
Creates a bspline
def Bspline(order, control_points, knot_vectors, weights, is_reference):
"""
Creates a bspline
Args:
order (int): Order of the bspline
control_points (list): Value of control points [Point1X, Point1Y, ...]
knot_vectors (list): Knot vectors [KnotVector1, KnotVector2, ...]
weights (list): Point weights [Weight1, Weight2, ...]
is_reference (bool): True if a reference bspline, false if a regular bspline
"""Gets the normal vector at a point on the spline
def GetNormalAt(u):
"""
Gets the normal vector at a point on the spline
Args:
u (float): Location along the spline. 0.0 = start, 1.0 = end
Returns:
Vector for point on the spline at the specified location (A, B)
"""Gets a point on the spline
def GetPointAt(u):
"""
Gets a point on the spline
Args:
u (float): Location along the spline. 0.0 = start, 1.0 = end
Returns:
Point on the spline at the specified location [X, Y]
"""Gets the X value of the spline at a location along the spline
def GetX(u):
"""
Gets the X value of the spline at a location along the spline
Args:
u (float): Location along the spline. 0.0 = start, 1.0 = end
Returns:
X value of spline at the specified location
"""Gets the Y value of the spline at a location along the spline
def GetY(u):
"""
Gets the Y value of the spline at a location along the spline
Args:
u (float): Location along the spline. 0.0 = start, 1.0 = end
Returns:
Y value of spline at the specified location
"""Divides the Bspline up into segments
def Subdivide(segments):
"""
Divides the Bspline up into segments
Args:
segments (int): Number of segments to obtain
Returns:
List of points between segments [X1, Y1, X2, Y2, ...]
"""Documentation Home | Classes | Methods Index | Properties Index | Members Index
Generated on 2025-09-23 02:06