Try ODA Facet Modeler in an ODA Example Application (Part 2 of 2)

Vladimir Savelyev

April 09, 2020

This is the second article in a series about experimenting with Facet Modeler features using an ODA example application. If you’re new to the Facet Modeler example module, see the first article in this series.

In this article we’ll create bodies and perform Boolean operations on them.

First we’ll create bodies from a predefined sample collection. The available models are:

 

bodies from a predefined sample collection

 

Start the FMCreateBody command. You’re prompted for a model index. Let’s start with Model 9. Then you need to specify an insertion position and scale of the model. A yellow snowman appears.

Repeat the FMCreateBody command and create Model 10. A green die appears.

Place the models as you want them to be processed by a Boolean operation. You can move the model by selecting it and dragging it with the mouse. For example, you can place them like this:

 

ODA Facet Modeler - models variant 1

 

Then use the FMBodyBoolean command to perform a Boolean operation. Select the bodies in the order they should be performed in the Boolean operation. For example, to subtract the snowman from the dice, select the dice first, then select the Difference operation.

 

ODA Facet Modeler examples 2 and 3

 

The next operation you can try is section. It can be applied to one or several bodies.

Run the FMBodySection command and select the body. You can use the result of the previous Boolean operation, then choose the section plane, for example Z. Then moving the mouse along the Z-axis, you see the section preview in real time. Click the mouse to perform the section operation:

 

ODA Facet Modeler - Section plan example

 

The FMBodyConvert command converts an OdDb3dSolid entity to a Facet Modeler body, but in some cases the conversion is not always possible. The result is not guaranteed.

The FMReadBody command allows you to load the body saved with the FacetModeler::BinaryStream class. It can be used for body dump visualization and debugging.