Skip to main content

cut3mf

Cut a slab off one face of a 3MF or STL model before slicing.

Made for a common CAD-to-slicer workaround: when text is embedded in a surface, the many separate letter bodies often cause trouble, in the CAD tool, on export, or in the slicer. Model a thin "helper plate" (e.g. 1 mm) on top of the surface that holds the letters together, export, then let cut3mf remove that plate. You get clean, watertight letter bodies flush with the surface, as separate parts of one object, so you can assign them their own filament.

It works with any CAD tool that exports 3MF, STL or OBJ (Onshape, Fusion, FreeCAD, SolidWorks, ...) and any slicer that imports them (Bambu Studio, OrcaSlicer, PrusaSlicer, Cura, ...).

Install

pipx install cut3mf      # or: pip install cut3mf

Usage

cut3mf part.3mf                    # remove the top 1 mm -> part_cut.3mf
cut3mf part.3mf -d 1.2 -o out.3mf  # remove the top 1.2 mm
cut3mf part.3mf --axis bottom      # plate on the bottom (same as --axis -z)
cut3mf part.3mf --at 14.5          # keep everything below Z = 14.5 mm
Option Meaning
-d, --depth Thickness to remove from the outermost face, mm (default 1.0)
-a, --axis Face with the plate: top, bottom, front, back, left, right, or x, -x, y, -y, z, -z (default top)
--at Cut at an absolute coordinate (mm) instead of a depth
-o, --output Output file (default <input>_cut.<ext>)
--separate 3MF: write each body as its own object instead of one object with parts
--eps Extra cut depth against coplanar slivers, mm (default 0.001)

How it works

  • All objects are measured together, so every object is cut at the same plane.
  • 3MF units are respected and converted to millimeters (some tools, e.g. Onshape, export in meters). STL has no units and is taken as millimeters.
  • 3MF output is one object whose bodies are its parts (3MF components), so slicers such as Bambu Studio, OrcaSlicer and PrusaSlicer load it as a single object with several parts, each of which can get its own filament. Use --separate to get independent objects instead. STL stores only one combined mesh.
  • The cut uses the Manifold kernel, so cut faces are closed and results stay watertight.
  • The cut goes 1 µm deeper than requested, because the plate's underside usually lies exactly on the cut plane and an exact cut leaves zero-thickness slivers.

Limits: the cut is a flat plane, and the plate must be the outermost part of the model in the chosen direction. 3MF output keeps the objects and their names, but not slicer project data such as filament assignments or print settings, so cut the exported model before you set it up in the slicer.

Python API

from cut3mf import cut_file

result = cut_file("part.3mf", axis="bottom", depth=1.0)
print(result.output, result.kept)

Development

python -m venv .venv && . .venv/bin/activate
pip install -e ".[test]"
pytest

Releasing

Releases are published to PyPI by GitHub Actions using trusted publishing. Bump version in pyproject.toml, commit, then run:

scripts/git_tag_and_push

The script runs the tests, tags the commit as v<version> and pushes the tag; the publish workflow builds and uploads that version.

License

MIT

Metadata

Release files for cut3mf 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cut3mf 0.2.0
File Size Uploaded Provenance Actions
cut3mf-0.2.0.tar.gz 9.6 kB With provenance Details for cut3mf-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for cut3mf 0.2.0
File Interpreter ABI Platform Actions
cut3mf-0.2.0-py3-none-any.whl Python 3 none any Details for cut3mf-0.2.0-py3-none-any.whl

Total release size: 18.3 kB

Release files / cut3mf-0.2.0.tar.gz

Download URL cut3mf-0.2.0.tar.gz
Size 9.6 kB
Tags Source
SHA-256 checksum
How to use checksums
45c75afeb8da2e64fc5ecf49313e7fcd99706e98bc2e53f7932b2283d2c1941d
BLAKE2b-256 checksum
How to use checksums
c37a98ebc9ad742c5f2515fddecb7ac4950a7abc6aa2a41d290e1b967b424d51
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.

Transparency log

Release files / cut3mf-0.2.0-py3-none-any.whl

Download URL cut3mf-0.2.0-py3-none-any.whl
Size 8.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7d9596ae38ad38e050e1d75c1a11f835c299176f084d9ac52f260a979687ed72
BLAKE2b-256 checksum
How to use checksums
9c9eaab95f5169b7ef95d9a6457a2f8aaf2b188cf965d3a41870cfa4bedc7ed9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.

Transparency log

Security for cut3mf 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for cut3mf-0.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page