


The meshing world is growing and evolving at a rapid pace, be it for computer graphics, numerical simulations, texture, or other applications. A novelty in the meshing world is "mesh boolean". This refers to post-processing existing meshes via boolean operations such as union, subtraction, and intersection, such that a new more desired mesh is obtained. For example for two meshes,
-
union operation:
$\Omega_3^h = \Omega_1^h \cup \Omega_2^h = {\Omega_{1,1}^h , \Omega_{2,2}^h}$ -
intersection operation
$\Omega_3^h = \Omega_1^h \cap \Omega_2^h = {\Omega_{1,2}^h , \Omega_{2,1}^h}$ -
subtraction operation
You can see an example of union mesh operation on the left, performed via this plugin.
Such meshing operations could be of interest for multiple reasons, e.g, in evolving mesh simulations, in crash simulations, for creating and edit digital shapes, and for optical tomography based mesh construction.
This plugin provides an interface for performing boolean operations on meshes in SALOME, the plugin attaches itself to SMESH (Salome Mesh) module, and provides SALOME uses with possiblity of performing boolean operations via five diffrent boolean engines.
To try the plugin locally, follow these steps:
-
Clone the repo to
$SMESH_ROOT_DIR/share/salome/plugins/smesh/
-
Append the following code to the end of the file
$SMESH_ROOT_DIR/share/salome/plugins/smesh/smesh_plugins.py
:
# mesh boolean plugin for SALOME
try:
from meshbooleanplugin.mesh_boolean_plugin import MeshBoolean
salome_pluginsmanager.AddFunction('Boolean Mesh Operations', 'Perform boolean operations on meshes', MeshBoolean)
except Exception as e:
salome_pluginsmanager.logger.info('ERROR: MeshBoolean plug-in is unavailable: {}'.format(e))
pass
this can be easily performed via the following command
echo "\n# mesh boolean plugin for SALOME\ntry:\n\tfrom meshbooleanplugin.mesh_boolean_plugin import MeshBoolean\n\tsalome_pluginsmanager.AddFunction('Boolean Mesh Operations', 'Perform boolean operations on meshes', MeshBoolean)\nexcept Exception as e:\n\tsalome_pluginsmanager.logger.info('ERROR: MeshBoolean plug-in is unavailable: {}'.format(e))\n\tpass" >> smesh_plugins.py
- Prepare the plugin, this involes preparing
*.ui
files and downloading the boolean operation engines:
cd meshbooleanplugin
make all
- Compile the project with
mkdir -p build
cd build
cmake ..
make
have a look at the CmakeList.txt
to compile the backend engines of your choice.
- Install the Python requirements with
salome context
pip install -r requirements.txt
- start salome
./salome
- open SMESH and browse to
Mesh > SMESH plugins > Boolean Mesh Operations
, this shoudl open the widget for perfroming boolean operations for the mesh

- You can then add meshes (
Left Mesh
andRight Mesh
) via SMESH object browser or upload a mesh. - Choose what kind of boolean operation you would like to perform in the
Operator
section of the widget. - Choose the backend engine from the dropdown list in
Engine
section, and clickcompute
. - Your mesh should appear in teh SMESH object browser.