NurbsCurve

class compas.geometry.NurbsCurve[source]

Bases: Curve

A NURBS curve is defined by control points, weights, knots, and a degree.

Parameters:
namestr, optional

The name of the curve.

Attributes:
pointslist[compas.geometry.Point], read-only

The control points.

weightslist[float], read-only

The weights of the control points.

knotslist[float], read-only

The knots, without multiplicity.

knotsequencelist[float], read-only

The complete knot vector.

multiplicitylist[int], read-only

The multiplicities of the knots.

continuityint, read-only

The degree of continuity of the curve.

degreeint, read-only

The degree of the curve.

orderint, read-only

The order of the curve (degree + 1).

Methods

copy

Make an independent copy of the current curve.

elevate_degree

from_arc

Construct a NURBS curve from an arc.

from_circle

Construct a NURBS curve from a circle.

from_ellipse

Construct a NURBS curve from an ellipse.

from_interpolation

Construct a NURBS curve by interpolating a set of points.

from_line

Construct a NURBS curve from a line.

from_native

Construct a NURBS curve from a curve object.

from_parameters

Construct a NURBS curve from explicit curve parameters.

from_points

Construct a NURBS curve from control points.

from_step

Load a NURBS curve from an STP file.

insert_knot

reduce_degree

refine_knot

remove_knot

Inherited Methods

ToString

Converts the instance to a string.

aabb

Compute the axis-aligned bounding box of the curve.

closest_point

Compute the closest point on the curve to a given point.

compute_aabb

Compute the axis-aligned bounding box of the geometry.

compute_obb

Compute the oriented bounding box of the geometry.

curvature_at

Compute the curvature vector of the curve at a parameter.

divide_by_count

Compute the curve parameters that divide the curve into a specific number of equal length segments.

divide_by_length

Compute the curve parameters that divide the curve into segments of specified length.

fair

frame_at

Compute the local frame of the curve at a parameter.

from_json

Construct an object of this type from a JSON file.

from_jsonstring

Construct an object of this type from a JSON string.

from_obj

Load a curve from an OBJ file.

length

Compute the length of the curve.

normal_at

Compute the normal of the curve at a parameter.

offset

point_at

Compute a point of the curve at a parameter.

reverse

Reverse the parametrisation of the curve.

reversed

Reverse a copy of the curve.

rotate

Rotate the geometry.

rotated

Returns a rotated copy of this geometry.

scale

Scale the geometry.

scaled

Returns a scaled copy of this geometry.

sha256

Compute a hash of the data for comparison during version control using the sha256 algorithm.

smooth

split

tangent_at

Compute the tangent vector of the curve at a parameter.

to_json

Convert an object to its native data representation and save it to a JSON file.

to_jsonstring

Convert an object to its native data representation and save it to a JSON string.

to_obj

Write the curve geometry to an OBJ file.

to_points

Convert the curve to a list of points.

to_polygon

Convert the curve to a polygon.

to_polyline

Convert the curve to a polyline.

to_step

Write the curve geometry to a STP file.

transform

Transform the local coordinate system of the curve.

transformed

Returns a transformed copy of this geometry.

translate

Translate the geometry.

translated

Returns a translated copy of this geometry.

trim

validate_data

Validate the data against the object's data schema.