RhinoNurbsCurve

class compas_rhino.geometry.RhinoNurbsCurve(*args, **kwargs)[source]

Bases: compas.geometry.curves.nurbs.NurbsCurve

Class representing a NURBS curve based on the NurbsCurve of Rhino.Geometry.

Attributes
  • points (list of compas.geometry.Point) – The control points of the curve.

  • weights (list of float) – The weights of the control points.

  • knots (list of float) – The knot vector, without duplicates.

  • multiplicities (list of int) – The multiplicities of the knots in the knot vector.

  • knotsequence (list of 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 of float) – The parameter domain.

  • start (compas.geometry.Point) – The point corresponding to the start of the parameter domain.

  • end (compas.geometry.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.

References

2

https://developer.rhino3d.com/api/RhinoCommon/html/T_Rhino_Geometry_NurbsCurve.htm

3

https://en.wikipedia.org/wiki/Non-uniform_rational_B-spline

4

https://developer.rhino3d.com/guides/opennurbs/nurbs-geometry-overview/

Attributes

data

The representation of the object as native Python data.

degree

The degree of the curve (degree = order - 1).

dimension

The dimension of the curve.

domain

The parameter domain of the curve.

end

The point at the end of the curve.

is_closed

bool

is_periodic

bool

is_rational

bool

knots

Knots without repeating elements.

knotsequence

Knots with multiplicities.

multiplicities

Multiplicities of the knots.

order

The order of the curve (order = degree + 1).

points

The control points.

start

The point at the start of the curve.

weights

The weights of the control points.

Inherited Attributes

DATASCHEMA

The schema of the data of this object.

JSONSCHEMA

The schema of the JSON representation of the data of this object.

JSONSCHEMANAME

bounding_box

dtype

The type of the object in the form of a '2-level' import and a class name.

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

aabb

Compute the axis aligned bounding box of the curve.

closest_point

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

copy

Make an independent copy of the current curve.

curvature_at

Compute the curvature at a point on the curve.

divide_by_count

Divide the curve into a specific number of equal length segments.

divide_by_length

Divide the curve into segments of specified length.

frame_at

Compute the local frame at a point on the curve.

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_parameters

Construct a NURBS curve from explicit curve parameters.

from_points

Construct a NURBS curve from control points.

from_rhino

Construct a NURBS curve from an existing Rhino curve.

from_step

Load a NURBS curve from an STP file.

length

Compute the length of the curve.

locus

Compute the locus of the curve.

obb

Compute the oriented bounding box of the curve.

point_at

Compute a point on the curve.

reverse

Reverse the parametrisation of the curve.

segment

Modifies this curve by segmenting it between the parameters u and v.

segmented

Returns a copy of this curve by segmenting it between the parameters u and v.

space

Compute evenly spaced parameters over the curve domain.

tangent_at

Compute the tangent vector at a point on the curve.

to_line

Convert the NURBS curve to a line.

to_polyline

Convert the NURBS curve to a polyline.

to_step

Write the curve geometry to a STP file.

transform

Transform this curve.

transformed

Transform a copy of the curve.

xyz

Compute point locations corresponding to evenly spaced parameters over the curve domain.

Inherited Methods

fair

from_data

Construct a NURBS curve from its data representation.

from_json

Construct an object from serialized data contained in a JSON file.

from_jsonstring

Construct an object from serialized data contained in a JSON string.

to_data

Convert an object to its native data representation.

to_json

Serialize the data representation of an object to a JSON file.

to_jsonstring

Serialize the data representation of an object to a JSON string.

validate_data

Validate the object's data against its data schema (self.DATASCHEMA).

validate_json

Validate the object's data against its json schema (self.JSONSCHEMA).