NurbsCurve

- class NurbsCurve
A nurbs curve value.
This object is a standard nurbs curve with no other parameter than a position.:cvar NurbsCurve default_value: Static. The default value.
Methods
Constructor(s)
closest(p, r, error, max_try, cache)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(error)Compute the curve length.
mode()Return the curve degree.
range()Return the curve parameter visible range.
Return the readable curve knots.
Return the readable control points weights.
resample(knots, degree)Resample a curve.
reverse()Reverse the control point order.
span()Return the number of span.
Return the writable curve knots.
Return the writable control points weights.
Properties
default_value- __init__()
Constructor(s)
NurbsCurve ()
Create an empty curve.
NurbsCurve (points: BufferConstV3f,knots: BufferConstFloat,degree: int,mode: Mode)
Create a curve.
NurbsCurve (v: Value)
Cast a Value in NurbsCurve.
If v is not a NurbsCurve object, this object will be an empty curve.
- closest(p: Imath.V3f, r: Imath.V3f, error: float, max_try: int, cache) float
Compute the curve closest point to p.
Returns the curve parameter value of the closest point. To speedup many closest queries on the same curve, it is possible to provide a cache of the subdivided curve. The subdivision must be done from start=knots[degree] to end=knots[knots.size()-degree-1] using a uniform parameter step. The default subdivision step count is 6*(knots.size()-degree*2).
- degree() int
Return the curve degree.
- Return type
int
- evaluate(u: float) Imath.V3f
Evaluate the curve at a u coordinate.
- Return type
evaluate(u: double) -> Imath.V3d
Evaluate the curve at a u coordinate in double precision.
- Return type
- 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
- length(error: float) float
Compute the curve length.
- Parameters
error (float) – The relative accepted error of the result
- Return type
float
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
length(error: float) -> float
Compute the curve length.
- Parameters
error (float) – The relative accepted error of the result
- Return type
float
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
- 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
- read_knots() BufferConstFloat
Return the readable curve knots.
- Return type
- read_weights() BufferConstFloat
Return the readable control points weights.
- Return type
- 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
- write_weights() BufferFloat
Return the writable control points weights.
- Return type