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, still as separate objects, 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>)
--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.
  • Use 3MF if you want separate objects (e.g. for a second filament); 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.1.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.1.0
File Size Uploaded Provenance Actions
cut3mf-0.1.0.tar.gz 8.9 kB With provenance Details for cut3mf-0.1.0.tar.gz

Built distribution (wheel)

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

Total release size: 17.1 kB

Release files / cut3mf-0.1.0.tar.gz

Download URL cut3mf-0.1.0.tar.gz
Size 8.9 kB
Tags Source
SHA-256 checksum
How to use checksums
2b9739979d7e403f24f67a89ac978d41906df1bff44038c9836a2c6ebd2d867a
BLAKE2b-256 checksum
How to use checksums
56e16063b1959afdcf28638b676d10eaa5d9af71316a0df9d6e285b87983abca
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 Oct 26, 2026.

Transparency log

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

Download URL cut3mf-0.1.0-py3-none-any.whl
Size 8.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
538b360ffbbeec699c235725ccb86af9f0c7c1df036465ab99e7c45b3f2fbc8b
BLAKE2b-256 checksum
How to use checksums
72d9856ba8df76df4579244dbb9a7b30e38018dffa4460eb9b570b277adfcad7
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 Oct 26, 2026.

Transparency log

Security for cut3mf 0.1.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.1.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 Oct 26, 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