AddThickSolid fails with overlapping facets when creating a shell around a tooth

Hello everyone,
Goal: I want to generate a layer of constant thickness around lower root area of a tooth geometry (using OpenCascade through Gmsh), something like:
Input: tooth volume
Output: tooth volume + outer offset shell
The upper crown region should remain untouched; The shell should only wrap the lower part of the tooth (root area)

The tooth comes from a simplified STL → STEP conversion.
It imports correctly, can be scaled and rotated, and generates a clean 3D mesh.
So I tried:
out = gmsh.model.occ.addThickSolid(
tooth_volume_tag,
faces_to_remove, # list of crown faces to “open”; for testing: faces_to_remove = []
t_PDL # offset thickness (0.2 mm – 5 mm tested)
)

Problem
addThickSolid fails depending on the offset thickness and the geometry resolution.

I get repetitive messages like:
"There are 2 intersections in the 1D mesh
Splitting those edges and trying again"
followed by the final error:
"Invalid boundary mesh (overlapping facets) on surface 1501 surface 1502"

The failure is not deterministic:
At ~5 mm offset, it sometimes succeeds
At 0.1–5 mm offset, it always fails (I need 0.4 mm offset)
Even with very simplified geometry (STL decimated to 500 faces), the error appears

The problematic surfaces are always the newly created offset surfaces from addThickSolid.
I tried removing duplicates before/after ThickSolid

Is there a recommended robust alternative inside Gmsh/OCC for generating a constant-thickness shell around a complex volume?
Do I need to preprocess the STEP geometry differently (repairing, smoothing, merging patches, remeshing)?

Additional Information
Model: tooth from STL (approx. 50 mm long before scaling)
Simplified STL: 1500 faces

Thanks alot!

Dmitrii Pasukhin's picture

Hello, OCCT's MakeThickSolid is working with BRep only. Mesh-related algorithms  are not a part of public version of OCCT.

Please consult with GMSH community.

Best regards, Dmitrii.