NurbsCurve
- class compas.geometry.NurbsCurve(*args, **kwargs)[source]
Bases:
Curve
A NURBS curve is defined by control points, weights, knots, and a degree.
- Parameters
name (str, optional) – The name of the curve.
- Attributes
points (list[
compas.geometry.Point
], read-only) – The control points.weights (list[float], read-only) – The weights of the control points.
knots (list[float], read-only) – The knots, without multiplicity.
knotsequence (list[float], read-only) – The complete knot vector.
multiplicity (list[int], read-only) – The multiplicities of the knots.
degree (int, read-only) – The degree of the curve.
dimension (int, read-only) – The spatial dimension of the curve.
domain (tuple[float, float]) – The domain of the parameter space of the curve.
order (int, read-only) – The order of the curve (degree + 1).
start (
compas.geometry.Point
, read-only) – The start point of the curve.end (
compas.geometry.Point
, read-only) – The end point of the curve.is_closed (bool, read-only) – Flag indicating that the curve is closed.
is_periodic (bool, read-only) – Flag indicating that the curve is periodic.
is_rational (bool, read-only) – Flag indicating that the curve is rational. If the curve is rational, the weights of the control points are rational numbers.
bounding_box (
compas.geometry.Box
, read-only) – The axis aligned bounding box of the curve.length (float) – The length of the curve.
Methods
Compute the closest point on the curve to a given point.
Make an independent copy of the current curve.
Compute the curvature at a point on the curve.
Divide the curve into a specific number of equal length segments.
Divide the curve into segments of specified length.
Compute the local frame at a point on the curve.
Construct a NURBS curve from a circle.
Construct a NURBS curve from its data representation.
Construct a NURBS curve from an ellipse.
Construct a NURBS curve by interpolating a set of points.
Construct a NURBS curve from a line.
Construct a NURBS curve from explicit curve parameters.
Construct a NURBS curve from control points.
Load a NURBS curve from an STP file.
Compute the locus of all points on the curve.
Compute a point on the curve.
Compute evenly spaced parameters over the curve domain.
Compute the tangent vector at a point on the curve.
Write the curve geometry to a STP file.
Transform this curve.
Transform a copy of the curve.
Compute point locations corresponding to evenly spaced parameters over the curve domain.
Inherited Methods
Construct an object from serialized data contained in a JSON file.
Construct an object from serialized data contained in a JSON string.
Convert an object to its native data representation.
Serialize the data representation of an object to a JSON file.
Serialize the data representation of an object to a JSON string.
Validate the object's data against its data schema.
Validate the object's data against its json schema.