OCCCurve

class compas_occ.geometry.OCCCurve(name=None)[source]

Bases: compas.geometry.curves.curve.Curve

Class representing a general curve object.

Parameters

name (str, optional) – The name of the curve.

Attributes
  • continuity (int, read-only) – The degree of continuity of the curve.

  • degree (int, read-only) – The degree of the curve.

  • dimension (int, read-only) – The dimension of the curve.

  • order (int, read-only) – The order of the curve (= degree + 1).

  • domain (tuple[float, float], read-only) – The domain of the parameter space of the curve.

  • start (Point, read-only) – The start point of the curve.

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

Other Attributes

occ_curve (Geom_Curve) – The underlying OCC curve.

Methods

aabb

Compute the axis aligned bounding box of the curve.

curvature_at

Compute the curvature vector at a curve parameter.

frame_at

Compute the local frame at a curve parameter.

from_occ

Construct a NURBS curve from an existing OCC BSplineCurve.

length

Compute the length of the curve.

point_at

Compute the point at a curve parameter.

reverse

Reverse the parametrisation of the curve.

tangent_at

Compute the tangent vector at a curve parameter.

transform

Transform this curve.

Inherited Methods

copy

Make an independent copy of the data object.

from_data

Construct an object of this type from the provided data.

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).