OpenGLContext.scenegraph.nurbs

Nurbs-rendering nodes based on VRML97 Nurbs extension
NurbsSurface is a geometry object, drop it into a shape to see the objects in a scene.
Note: at the moment, we cannot provide the object space extension, due to what appears to be a bug in the PyOpenGL library, so the code for that extension is short-circuit.

Functions

Classes

Abstract class providing surface-rendering framework
attributes geometryType -- string specifying the geometry type "polygon", "patch", "edge" sampling -- NurbsSampling instance specifying a particular sampling methodology
geometryType
exposedField SFString geometryType polygon
sampling
exposedField SFNode SFNode <function defaultSam
A 2D contour (collection of joined segments)
children
a set of polylines and/or curves which are joined to form the trimming contour
Normally used to trim a Nurbs surface...
A 3D nurbs curve (a curvy line in 3D space)
Notes: order -- is not currently used, as PyOpenGL calculates the order from the difference between the knot and control point arrays weight -- is not currently used, this is just not-yet-implemented, it's quite feasible to support it tessellation -- not currently used
Domain-distance parametric u and v coordinate sampling
uStep
exposedField SFFloat uStep 100.0
vStep
exposedField SFFloat vStep 100.0
A node-type specifying NURBs sampling method and parameters
Surface geometry implemented with gluNurbsSurface Notes: uOrder/vOrder -- is not currently used, as PyOpenGL calculates the order from the difference between the knot and control point arrays weight -- is not currently used, this is just not-yet-implemented, it's quite feasible to support it uTessellation/vTessellation -- not currently used color -- if present, is applied to the knot array one for one using another call to gluNurbsSurface
Path-length tolerance sampling
Can be either screen-space or object space, method = "screen" -> tolerance in pixels method = "object" -> tolerance in object-space coordinates and either parametric or not if true, tolerance is parametric tolerance (e.g. 0.5)
method
exposedField SFString method screen
parametric
exposedField SFBool parametric 0
tolerance
exposedField SFFloat tolerance 50.0
Simple polyline in 2D
Basically this just calls gluPwlCurve
Trimmed surface geometry
The TrimmedSurface is just a binding of a surface to a set of trimming contours. There is nothing particularly complex done by the trimmed surface, it simply defers to the surface and the trimming contours.