We are glad to present the new option of the Volume Maker algorithm which allows producing volumes without internal parts. It is available in current development version of OCCT. The option may be useful if you need to create only manifold volumes without any internal remains of the arguments. The difference between produced results is shown on the pictures below.
| Arguments | Result with internal parts | Result without internal parts |
| Archived image: external image | Archived image: external image | Archived image: external image |
| 8 faces and edge inside | Solid with two internal faces and internal edge | Solid without internal parts |
As you can see on the images, the option does not prevent from the creation of the internal edges on faces, but still the result is much cleaner.
The new mode of the algorithm also allows speeding up the creation of the volumes due to avoidance of the classification of the internal/external parts of the arguments relatively the new volumes. Let’s compare the performances of the two modes on the examples 3 and 4.2 from the first post. To make the third example more representative it has been slightly modified without changing the result - the planar faces have been made bigger. Here are the new arguments:
Archived image: external image
These additional parts of the planar faces will not be included into resulting volumes, but they will have to be classified on internal/external state to include internal parts into result. With the option to avoid internal parts turned on this classification is unnecessary, because in this mode neither internal nor external parts have to be taken into result.
The following environment has been used to measure the performance:
| Processor | Intel(R) Core(TM) i5-4460 CPU @ 3.20 GHz |
| System type | 64-bit Operating System |
| Installed memory (RAM) | 16GB |
| Operating System | Windows 10 Pro |
| Compiler | Microsoft Visual Studio Professional 2013, Version 12.0.31101.00 Update 4 |
| Open CASCADE | 7.1.0 development (master from 09/12/2016), optimized mode |
The table below shows the results of comparison:
| Example | Create internal parts, sec | Avoid internal parts, sec | Performance gain, times |
| Example 3 | 56.87 | 22.90 | 2.48 |
| Example 4.2 | 3.39 | 2.58 | 1.31 |
For both of these cases no internal parts have been created in both modes. Thus, in general the new mode should be faster (or the same) even for the cases without internal parts.
To use the new option on the API level you need to call the SetAvoidInternalShapes(const Standard_Boolean theAvoid) with the appropriate value. By default the new mode is switched off, i.e. the internal parts will be created.
To use the new option in DRAW the command mkvolume has been extended with the new optional parameter. To avoid the creation of internal parts type -ai after the arguments:
Usage: mkvolume r b1 b2 ... [-c] [-ni] [-ai]
Options:
-c - use this option if the arguments are compounds
containing shapes that should be interfered;
-ni - use this option if the arguments should not be interfered;
-ai - use this option to avoid internal for solids shapes in the result.
Here is the simple example:
box b1 10 10 10 vertex v 5 5 5 mkvolume result b1 v -ni -ai ;# solid without a vertex inside is created