NurbsCurve
- class compas.geometry.NurbsCurve(*args, **kwargs)[source]
Bases:
compas.geometry.curves.curve.Curve
Class representing a NURBS curve.
- Attributes
points (List[Point]) – The control points of the curve.
weights (List[float]) – The weights of the control points.
knots (List[float]) – The knot vector, without duplicates.
multiplicities (List[int]) – The multiplicities of the knots in the knot vector.
knotsequence (List[float]) – The knot vector, with repeating values according to the multiplicities.
degree (int) – The degree of the polynomials.
order (int) – The order of the curve.
domain (Tuple[float, float]) – The parameter domain.
start (
Point
) – The point corresponding to the start of the parameter domain.end (
Point
) – The point corresponding to the end of the parameter domain.is_closed (bool) – True if the curve is closed.
is_periodic (bool) – True if the curve is periodic.
is_rational (bool) – True is the curve is rational.
length (float) – Length of the curve.
Attributes
DATASCHEMA
The schema of the data of this object.
JSONSCHEMANAME
bounding_box
data
The representation of the object as native Python data.
degree
dimension
domain
dtype
The type of the object in the form of a '2-level' import and a class name.
end
is_closed
is_periodic
is_rational
knots
knotsequence
length
multiplicities
order
points
start
weights
Inherited Attributes
JSONSCHEMA
The schema of the JSON representation of the data of this object.
guid
The globally unique identifier of the object.
jsondefinitions
Reusable schema definitions.
jsonstring
The representation of the object data in JSON format.
jsonvalidator
JSON schema validator for draft 7.
name
The name of the object.
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 (self.DATASCHEMA).
Validate the object's data against its json schema (self.JSONSCHEMA).