Open Inventor Release 2024.2.0
 
Loading...
Searching...
No Matches
NURBS Extensions

Non-Uniform Rational B-Spline curves and surfaces are very powerful methods for representing curves and surfaces in a parametric form. Instead of using hundreds of points to define a curve, a few control points and parameters can define a very clean curve that can be approximated using a variable number of points depending on the point of view.

Open Inventor displays NURBS curves and surfaces using the SoNurbsSurface ,SoIndexedNurbsSurface ,SoNurbsCurve , and SoIndexedNurbsCurve nodes. NURBS surfaces can be trimmed, that is, cut like with scissors. Trim curves are defined using the SoProfile nodes. For more detailed information about NURBS, read Curves and Surfaces of The Inventor Mentor.

NURBS surfaces are very often used by CAD systems to represent complex assemblies. A whole car can be made of several thousands of NURBS surfaces. When displaying this type of large object, Open Inventor draws the triangles generated by “tessellating” the NURBS object. That is, by transforming the NURBS equations into triangles. When rendering in shaded mode, Gouraud shading hides the individual triangles and the object looks smooth. But when displaying in wireframe mode, Open Inventor displays the edges of each triangle. Thus, for large models, the image can become overly complicated and difficult to interpret. Also, when displaying in wireframe mode, NURBS surfaces may look flat even if they aren’t. For large surfaces displayed in wireframe, drawing a single isoparametric curve in the middle of the NURBS improves the rendering quality.

Alternatively, it is sometimes interesting to see the edges of each trimmed surface by visualizing the trim curves and the surface boundaries on top of the shaded surface.

*Adaptive tessellation*is the ability to generate more (or fewer) triangles depending on the curvature of the NURBS surface. Regions of higher curvature can be more highly triangulated, regions of lower curvature, less triangulated. This allows higher quality rendering while still maintaining good performance.

The SoNurbsProperty node provides all these features.

"Note" on display of trim curves, boundaries, and isoparametric curves, can dramatically speed up rendering of large models.

numSamplePoints
(SoSFInt32)
Specifies the number of sample points between trim curves control
points. If this value is equal to -1 (the default), this number is computed from the
SoComplexity node. It allows the number of triangles generated during
trim curve tessellation to be decreased when this field is set to a small value (less than
3). This field is used for the drawStyle values NORMAL and BOUNDARIES_AND_TRIM_CURVES.
color
(SoSFColor)
Specifies the color used for rendering trim curves and isoparametric
curves: BOUNDARIES_AND_TRIM_CURVES and CENTRAL_ISO_PARAM_CURVES
isoParamCurvesPattern
(SoSFUShort)
Specifies the line pattern used for rendering isoparametric
curves.
tessellationType
(SoSFEnum)
Specifies the tessellation type:* CONSTANT: The tessellation step size is constant and the
same for both the U and V axes. The tessellation step size depends on SoComplexity::value. (Default)
* ADAPTIVE: The tessellation depends on the curvature of
the geometry. Regions with a low curvature will be less tessellated than regions with a
high curvature.
tessellationDistance
(SoSFFloat)
Used when tessellationType is set to
ADAPTIVE. The maximum tessellation step size (curvilinear
distance) is this fraction of the diagonal of the bounding box of the surface or the group
of surfaces (SoNurbsGroup). Increasing this value make the
tessellation more dependent on tessellationAngle. Default
value is 0.01. That is, the distance must not be more than 1% of the diagonal of the
bounding box.
tessellationAngle
(SoSFFloat)
Used when tessellationType is set to
ADAPTIVE. Specifies the maximum angle (in radians)
between the normals of two adjacent tessellated faces. Decreasing this value adds more
tessellation points on flat parts of the surface. Default value is 0.35.

Example : Using SoNurbsProperties This example reads an Inventor file and inserts an SoNurbsProperty node as the first child of the root if the file does not already contain such a node. The ‘B’, ‘I’, and ‘N’ keys allow the user to show/hide boundaries, isoparametric curves, and the NURBS surface respectively. The ‘M’ and ‘L’ keys can be used to increase or decrease the number of sample points between trim curve control points. The program source code is available in:$OIVHOME/src/Inventor/examples/Features/NurbsProperties/NurbsProperties.cxx

SoNurbsProperty::NORMAL SoNurbsProperty::BOUNDARIES_AND_TRIM_CURVES
<SoNurbsProperty::CENTRAL_ISO_PARAM_CURVES SoNurbsProperty set to all of the above (using a bitmask)

Crack-free Tessellation

Joining three NURB surfaces along their common boundaries

Joining NURBS surfaces scene graph structure

examples of NURBS crack-free tessellation. For each model there are three files:

NURBS surfaces with cracks (left) and no cracks (right)