Real-time rendering of CSG models. More...

## Classes | |

class | SoCSGAction |

CSGAction class. More... | |

class | SoCSGGroup |

Group node for Constructive Solid Geometry rendering. More... | |

class | SoCSGOperation |

Class which computes a CSG operation (OR, AND, SUB, etc) from 2 solid objects. More... | |

class | SoSolidViz |

Class to initialize SolidViz. More... |

Real-time rendering of CSG models.

** DEPRECATED**: SolidViz is deprecated and no longer supported since OIV 9.5.

The SolidViz extension provides solid modeling nodes for describing 3D shapes as combinations of other shapes using Boolean operations such as merge, intersection, and subtraction.

** NOTE**: SolidViz is not a separately licensed extension. You must have an OpenInventor license string.

CSG stands for Constructive Solid Geometry. It is a powerful method for describing a 3D shape as a combination of simpler 3D shapes using the Boolean operations merge (union), intersection, and subtraction. For instance, the expression "(A-B)+C" means remove B from A, then merge the result with C. This is called a CSG expression, describing a CSG tree.

Actual computation of the geometry resulting from a CSG expression can be a slow process, at least not fast enough for real-time updates in interactive applications.

However a visual simulation of a CSG shape can be achieved in many cases at interactive speed by a special rendering method taking advantage of accelerated OpenGL rendering and the stencil buffer.

SolidViz implements a visual simulation of CSG shapes.

A new group node (SoCSGGroup) allows the specification of a CSG expression.

Note: Some additional classes for computing the actual geometry are provided on an "as-is" basis, with no support or warranty. See the SolidViz directory $OIVHOME/examples/source/SolidViz/examples/csgAction and $OIVHOME/examples/source/SolidViz/examples/csgOperation.

- SoSolidViz Initialization class
- Used to initialize and get information about the SolidViz module.

- SoCSGGroup Group node for interactive CSG rendering
- Performs a Constructive Solid Geometry (CSG) rendering.

- Initialize SolidViz module (SoSolidViz::initClass()).
- Create an SoCSGGroup.
- Add as many children to the SoCSGGroup as there are solid shapes.
- Specify the expression (though the expression field) of the SoCSGGroup.
- Add the SoCSGGroup to the scene graph.

This group node performs a Constructive Solid Geometry (CSG) rendering. The children of this group define the solids that are involved in the CSG models.

The steps required to realize an interactive rendering of a CSG shape are the following:

The example program $OIVHOME/examples/source/SolidViz/examples/csgGroup.cxx shows these steps.

- CSG rendering
**requires**that an**OpenGL stencil buffer**exist for the Open Inventor drawing window. For best performance, the graphics accelerator should do stencil buffer operations in hardware. - [Win32] You can "hint" to the Pixel Format chooser that stencil buffer support is important by setting the environment variable OIV_REQUIRE_STENCIL.
- A good
**graphics accelerator**is highly recommended. CSG rendering requires two or (potentially many) more rendering passes, which will reduce performance. The number of passes is related to the complexity of the CSG expression and to the convexity of the geometry. **Picking**on a CSG rendering may not work as expected. SoCSGGroup produces the visual effect of the specified CSG operations, but the actual geometry is not modified. Open Inventor picking operates on the actual geometry. For example, if a cube has a cylindrical "hole" cut out of it using CSG rendering, picking on the "hole" will return a pick path to the geometry used to cut out the hole.- CSG rendering requires a specific ordering of operators in the CSG expression.
**"Normalization"**of arbitrary expressions is currently left to the application (see SoCSGGroup documentation for more details).

Copyright © Thermo Fisher Scientific All rights reserved.