Boolean operations on/with STL meshes, utilizing a Docker image of PyMesh.
STLs placed in ./home/. with the following naming convention(s):
- at least one file
msh_0_nul.stl, followed by msh_n_str.stl, withnand integer andstra string of 3 characters, specifying an operation.
The operations are:
dif: differenceuni: unionint: intersectionsym: symmetric difference
See the PyMesh documentation.
Consider for example the following files in the the ./home/ directory:
├──home
│ ├── msh_0_nul.stl
│ ├── msh_1_dif.stl
│ ├── msh_2_dif.stl
│ ├── msh_3_uni.stl
│ ├── msh_4_dif.stl
See Figure 1 to 5.
Figure 1: Input STL mesh 0 (msh_0_nul.stl).
Figure 2: Input STL mesh 1 (msh_1_dif.stl).
Figure 3: Input STL mesh 2 (msh_2_dif.stl).
Figure 4: Input STL mesh 3 (msh_3_uni.stl).
Figure 5: Input STL mesh 4 (msh_4_dif.stl).
Given the presence of these files, executing the script /home/main.py, should produce the output displayed in Figure 6.
Figure 5: Output STL mesh (output.stl).





