split3d
provides a Python CLI for slicing watertight 3D meshes (3MF, STL, OBJ) into an axis-aligned grid of parts. The main entry point is split_grid.py
, which orchestrates mesh loading, boolean slicing across multiple backends, and optional hole filling for downstream fabrication or analysis.
- Install dependencies with
uv sync
. - Explore CLI options via
uv run split_grid.py --help
. - Run a sample split against the included mesh:
Generated pieces land in
uv run split_grid.py nameofthefile.3mf --grid 3x2x1 --output-dir out --output-format 3mf --force-watertight
out/
, named by their grid coordinates (*_x0_y1_z0.stl
).
- Mesh operations rely on
trimesh
, with optional acceleration frompyvista
,cork
, origl
. Ensure any new dependencies are added topyproject.toml
anduv.lock
. - Temporary artefacts (e.g.,
out/
) should be excluded from commits unless explicitly required.
KathmanduSkyline.3mf
serves as a compact fixture for local validation. You can swap in custom meshes by pointing the CLI at your own file path.