NurbsSurface

- class NurbsSurface
A nurbs surface value.
This object is a standard nurbs surface. The control points are stored in u order first:cvar NurbsSurface default_value: Static. The default value.
Methods
Constructor(s)
closest(p, r, error, max_try, cache)Compute the surface closest point to p.
control_point(u, v)Return a single control point.
Return the number of control points in u.
Return the number of control points in v.
degree_u()Return the surface degree in u.
degree_v()Return the surface degree in v.
evaluate(u, v)Evaluate the surface at a uv coordinate.
evaluate_dp(u, v, previous_u, previous_v)Evaluate the surface position derivatives at a uv coordinate.
iso_curve(u, use_v)Extract an iso curve from the surface.
mode_u()Return the surface degree in u.
mode_v()Return the surface degree in v.
range_u()Return the u parameter range.
range_v()Return the v parameter range.
Return the readable surface knots in u.
Return the readable surface knots in v.
set_range_u(r)Set the u parameter range.
set_range_v(r)Set the v parameter range.
span_u()Return the number of span in u.
span_v()Return the number of span in v.
tessellate(subdivision_u, subdivision_v, ...)Return a mesh out of the nurbs surface, with the uv and normals if requested.
Return the writable surface knots in u.
Return the writable surface knots in v.
Properties
default_value- __init__()
Constructor(s)
NurbsSurface ()
Create an empty surface.
NurbsSurface (v: Value)
Cast a Value in NurbsSurface.
If v is not a NurbsSurface object, this object will be an empty nurbs surface.
NurbsSurface (curves,degree_v: int,mode: Mode,use_u_direction: bool,uniform: bool)
Build a nurbs surface using nurbs curves (loft)
The curve must have the same degree and the same knots.
- Parameters
curves - The curves to use to loft the surface
degree_v (int) - The degree of the second dimension
mode (Mode) - The mode of the second dimension
use_u_direction (bool) - If true, loft in the u direction
uniform (bool) - If true, use an uniform parametrization, if false, use a chord length paramatrization
NurbsSurface (curves,parameters,degree_v: int,mode: Mode,use_u_direction: bool)
Build a nurbs surface using nurbs curves (loft)
The curve must have the same degree and the same knots.
- Parameters
curves - The curves to use to loft the surface
parameters - The parameters of each curve in the final surface. Same size than curves.
degree_v (int) - The degree of the second dimension
mode (Mode) - The mode of the second dimension
use_u_direction (bool) - If true, loft in the u direction
NurbsSurface (points: BufferConstV3f,knots_u: BufferConstFloat,knots_v: BufferConstFloat,degree_u: int,degree_v: int,mode_u: Mode,mode_v: Mode)
Build a surface.
- closest(p: Imath.V3f, r: Imath.V3f, error: float, max_try: int, cache: NurbsSurfaceClosestCache) Imath.V2f
Compute the surface closest point to p.
Returns the surface parameters of the closest point.
- Parameters
p (Imath.V3f) – The position to project on the surface
r (Imath.V3f) – If not null, it is filled with the closest curve position
error (float) – Stop to iterate when (du < error*(u_max-umin) && dv < error*(v_max-vmin))
max_try (int) – Maximum number of iterations
cache (NurbsSurfaceClosestCache) – An optionnal cache
- Return type
- control_points_u() int
Return the number of control points in u.
- Return type
int
- control_points_v() int
Return the number of control points in v.
- Return type
int
- degree_u() int
Return the surface degree in u.
- Return type
int
- degree_v() int
Return the surface degree in v.
- Return type
int
- evaluate(u: float, v: float) Imath.V3f
Evaluate the surface at a uv coordinate.
- Return type
evaluate(u: double,v: double) -> Imath.V3d
Evaluate the surface at a uv coordinate in double precision.
- Return type
- evaluate_dp(u: float, v: float, previous_u: bool, previous_v: bool)
Evaluate the surface position derivatives at a uv coordinate.
Return the (dp/du, dp,dv) vectors . They are not normalized.
- iso_curve(u: float, use_v: bool) NurbsCurve
Extract an iso curve from the surface.
Extract the curve at the u parameter. If use_v is true, extact the curve in the V direction, else in the U direction.
- Return type
- read_knots_u() BufferConstFloat
Return the readable surface knots in u.
- Return type
- read_knots_v() BufferConstFloat
Return the readable surface knots in v.
- Return type
- span_u() int
Return the number of span in u.
- Return type
int
- span_v() int
Return the number of span in v.
- Return type
int
- tessellate(subdivision_u: int, subdivision_v: int, compute_uv_and_normals: bool) Mesh
Return a mesh out of the nurbs surface, with the uv and normals if requested.
- Return type
- write_knots_u() BufferFloat
Return the writable surface knots in u.
- Return type
- write_knots_v() BufferFloat
Return the writable surface knots in v.
- Return type