NurbsCurve

Inheritance diagram of rumba.NurbsCurve
class NurbsCurve

Bases: rumba.Points

A nurbs curve value.

This object is a standard nurbs curve with no other parameter than a position.

Constructors

__init__

Methods

closest(p) Compute the curve closest point to p.
degree() Return the curve degree.
evaluate(u) Evaluate the curve at a u coordinate.
evaluate_dp(u) Evaluate the curve position derivatives at a u coordinate.
length(start) Compute the curve length between the start and end u parameters.
mode() Return the curve degree.
range() Return the curve parameter visible range.
read_knots() Return the readable curve knots.
read_weights() Return the readable control points weights.
resample(knots,degree) Resample a curve.
reverse() Reverse the control point order.
span() Return the number of span.
write_knots() Return the writable curve knots.
write_weights() Return the writable control points weights.
class Mode

Bases: pybind11_builtins.pybind11_object

Members:

Periodic

Open

Closed

closest(p: Imath.V3f, r: Imath.V3f, error: float, max_try: int) → float

Compute the curve closest point to p.

Returns the curve parameter value of the closest point.

Parameters:
  • p (Imath.V3f) – The position to project on the curve
  • r (Imath.V3f) – If not null, it is filled with the closest curve position
  • error (float) – The minimum error in vertex space
  • max_try (int) – Maximum numbr of try
Return type:

float

degree() → int

Return the curve degree.

Return type:int
evaluate(u: float) → Imath.V3f

Evaluate the curve at a u coordinate.

Return type:Imath.V3f
evaluate_dp(u: float) → Imath.V3f

Evaluate the curve position derivatives at a u coordinate.

Return the dp/du vector which may not be normalized.

Return type:Imath.V3f
length(start: float, end: float, error: float) → float

Compute the curve length between the start and end u parameters.

Parameters:
  • start (float) – The starting u parameter of the arc
  • end (float) – The ending u parameter of the arc
  • error (float) – The relative accepted error of the result
Return type:

float

mode() → Mode

Return the curve degree.

Return type:Mode
range() → Imath.V2f

Return the curve parameter visible range.

For periodic curves, this is not the same than the first and last knots.

Return type:Imath.V2f
read_knots() → BufferConstFloat

Return the readable curve knots.

Return type:BufferConstFloat
read_weights() → BufferConstFloat

Return the readable control points weights.

Return type:BufferConstFloat
resample(knots, degree: int) → None

Resample a curve.

Modify the curve knots and degree and rebuild the curve in order to keep its shape if possible.

reverse() → None

Reverse the control point order.

span() → int

Return the number of span.

Return type:int
write_knots() → BufferFloat

Return the writable curve knots.

Return type:BufferFloat
write_weights() → BufferFloat

Return the writable control points weights.

Return type:BufferFloat