NurbsSurface

Inheritance diagram of rumba.NurbsSurface
class NurbsSurface

Bases: rumba.Points

A nurbs surface value.

This object is a standard nurbs surface. The control points are stored in u order first

Constructors

__init__

Methods

closest(p) Compute the surface closest point to p.
control_point(u) Return a single control point.
control_points_u() Return the number of control points in u.
control_points_v() 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) Evaluate the surface at a uv coordinate.
evaluate_dp(u) Evaluate the surface position derivatives at a uv coordinate.
iso_curve(u) 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.
read_knots_u() Return the readable surface knots in u.
read_knots_v() 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) Return a mesh out of the nurbs surface.
write_knots_u() Return the writable surface knots in u.
write_knots_v() Return the writable surface knots in v.
class Mode

Bases: pybind11_builtins.pybind11_object

Members:

Periodic

Open

Closed

closest(p: Imath.V3f, r: Imath.V3f, error: float, max_try: int) → 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
Return type:

Imath.V2f

control_point(u: int, v: int) → Imath.V3f

Return a single control point.

Return type:Imath.V3f
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:Imath.V3f
evaluate_dp(u: float, v: float)

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:NurbsCurve
mode_u() → Mode

Return the surface degree in u.

Return type:Mode
mode_v() → Mode

Return the surface degree in v.

Return type:Mode
range_u() → Imath.V2f

Return the u parameter range.

Return type:Imath.V2f
range_v() → Imath.V2f

Return the v parameter range.

Return type:Imath.V2f
read_knots_u() → BufferConstFloat

Return the readable surface knots in u.

Return type:BufferConstFloat
read_knots_v() → BufferConstFloat

Return the readable surface knots in v.

Return type:BufferConstFloat
set_range_u(r: Imath.V2f) → None

Set the u parameter range.

set_range_v(r: Imath.V2f) → None

Set the v parameter range.

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) → Mesh

Return a mesh out of the nurbs surface.

Return type:Mesh
write_knots_u() → BufferFloat

Return the writable surface knots in u.

Return type:BufferFloat
write_knots_v() → BufferFloat

Return the writable surface knots in v.

Return type:BufferFloat