MatrixCurve

- class MatrixCurve
A Matrix curve value.
This object is a special curve built from control matrices, and that outputs a matrix. The position output of the curve is defined by piecewise cubic Splines between the control matrices and along their “main” axis. So are the matrix output’s scale and shear, while its rotation is defined using cubic interpolation of the rotations of the control matrices. The tangents of the positional cubic Splines are automatically computed from the control matrices’ rotation around the “main” axis.:cvar MatrixCurve default_value: Static. The default value.
Methods
Constructor(s)
closest(p, r, error, max_try)Compute the curve closest matrix to p.
evaluate(u)Evaluate the curve at a u coordinate, oriented along the tangent.
length(start, end, error)Compute the curve length between the start and end u parameters.
- rtype
MainAxis
mode()- rtype
OrientationMode
param_from_length(length, error, max_try)Compute the parameter for the given arc length.
Return the readable curve matrices.
tessellate(start, end, samples, uniform)Builds the line mesh for the sub-part of the curve delimited by start and end.
type()- rtype
CurveType
Return the writable curve matrices.
Properties
default_value- class CurveType
Members:
ConstrainedBezier : The curve is a piecewise cubic Bezier curve, whose internal tangents are driven by the control matrices.
Bezier : The curve is a piecewise cubic Bezier curve, whose internal tangents are automatic.
Spline : The curve is a Nurbs curve defined from the control positions.
- __init__()
- class MainAxis
Members:
X : Use the X axis.
Y : Use the Y axis.
Z : Use the Z axis.
MX : Use the negated X axis.
MY : Use the negated Y axis.
MZ : Use the negated Z axis.
- __init__()
- class OrientationMode
Members:
Free : The orientation along the curve is given by the cubic interpolation of the control matrices.
Constrained : The orientation along the curve is computed so that the main axis is tangent to the curve.
- __init__()
- __init__()
Constructor(s)
Shape (v: Value)
Cast a Value object in Shape.
If v has not the good type, a default value is constructed.
- closest(p: Imath.V3d, r: Imath.M44d, error: double, max_try: int) double
Compute the curve closest matrix to p.
Returns the curve parameter value of the closest point.
- Parameters
p (Imath.V3d) – The position to project on the curve
r (Imath.M44d) – If not null, it is filled with the closest curve matrix
error (double) – The minimum error in vertex space
max_try (int) – Maximum numbr of try
- Return type
double
- evaluate(u: double) Imath.M44d
Evaluate the curve at a u coordinate, oriented along the tangent.
- Return type
- length(start: double, end: double, error: double) double
Compute the curve length between the start and end u parameters.
- Parameters
start (double) – The starting u parameter of the arc
end (double) – The ending u parameter of the arc
error (double) – The relative accepted error of the result
- Return type
double
- mode() OrientationMode
- Return type
- param_from_length(length: double, error: double, max_try: int) double
Compute the parameter for the given arc length.
- Parameters
length (double) – The arc length for which we want a parameter
error (double) – The relative accepted error of the result
max_try (int) – Maximum try to reach the error
- Return type
double
- read_matrices() BufferConstM44d
Return the readable curve matrices.
- Return type
- tessellate(start: double, end: double, samples: int, uniform: bool) Mesh
Builds the line mesh for the sub-part of the curve delimited by start and end. If uniform is true, the curve is sampled with uniform arc-length.
- Return type
- write_matrices() BufferM44d
Return the writable curve matrices.
- Return type