Boolean operations with STL files

Hi!
I’m having some trouble performing boolean operations with volumes created from STL files. My model consists of three volumes:

In green (Volume 1), a "hollow" body.
In orange (Volume 2), a volume that surrounds and partially enters the hollow body.
A box that surrounds both volumes.

reset
set developer commands on
import stl "mandible.stl" feature_angle 135.00 merge stitch 
import stl "tissue.stl" feature_angle 135.00 merge stitch 
create brick bounding box Volume all extended percentage 50
export stl "box.stl" volume 3  overwrite 
delete volume 3
import stl "box.stl" feature_angle 135.00 merge stitch 
compress ids

I created Volume 2 with the idea of performing a boolean difference to fill the interior of Volume 1 and then be able to imprint/merge. For Volume 3, I have to save it and then re-import it since it’s not allowed to operate with “volumes containing geometry from different modeling engines”. subtract volume 1 from volume 2 keep works fine but then, if I try to subtract volume 1 from volume 3 keep I get this error:

ERROR: Tiler error in FacetBoolean:  premature end of list.
ERROR: Error:  Objects for Booleans must first be classified.

Which may be a hint for debugging. I also tried to subtract both Volume 1 and 2 from Volume 3 but got the same error. At the end, I just need these geometries for meshing with sculpt.

I’m attaching the STL files involved.

Many thanks for your help!

Carlos
files.zip (9.6 MB)

Hi Carlos,
you can set the geometry engine right before you create the brick. Then you won’t get the different modeling engines error. Also the boolean operations are working.

reset
set developer commands on
import stl "mandible.stl" feature_angle 135.00 merge stitch 
import stl "tissue1.stl" feature_angle 135.00 merge stitch 
set geometry engine facet
create brick bounding box Volume all extended percentage 50
compress ids

subtract volume 1 from volume 2 keep
subtract volume 1 from volume 3 keep

I couldn’t reproduce this one.

Which version of Cubit are you using?

Hi Norbert,

Thanks for the tip. If then I do

subtract volume 4 from volume 5 keep

I get that error. I’m using version 2024.8 for linux.

Now i can reproduce this. This will take me some time to investigate.