Uploaded: Mar 19, 2026
SAMSON version: 11.0.0
Copy link
This document contains an example of a "carving" script. The script assumes the document contains contains a watertight mesh (which can be obtained by importing OBJ or STL files into SAMSON), and creates two selection groups: one for atoms inside the mesh, and one for atoms outside. These groups can then be used to delete the corresponding atoms.
The script should be considered as a starting point since it does not use any acceleration structures (e.g., a bounding-volume hierarchy on the mesh) and can be slow when the mesh contains many triangles.