Klipper GCode Preprocessor for Object Cancellation
This preprocessor modifies GCode files to add klipper's exclude object gcode.
The following slicers are supported:
- SuperSlicer
- PrusaSlicer
- Slic3r
- Cura
- IdeaMaker
Installation and usage
SuperSlicer, PrusaSlicer, and Slic3r
Download the provided binary for your platform, and place it in with in your slicer's folder.
In your Print Settings, under Output Options, add preprocess_cancellation.exe; to the
"Post-Processing Scripts". For mac or linux, you should just use preprocess_cancellation;
Then, all generated gcode should be automatically processed and rewritten to support cancellation.
G-Codes for Object Cancelation
There are 3 gcodes inserted in the files automatically, and 4 more used to control the object cancellation.
EXCLUDE_OBJECT_DEFINE NAME=<object name> [CENTER=x,y] [POLYGON=[[x,y],...]]
The NAME must be unique and consistent throughout the file. CENTER is the center location for the mesh, used to show on interfaces where and object being canceled is on the bed. POLYGON is a series of points, used to represent the bounds of the object. It can be just a bounding box, a simplified outline, or another useful shape.
EXCLUDE_OBJECT_START NAME=<object name> and EXCLUDE_OBJECT_END [NAME=<object name>]
The beginning and end markers for the gcode for a single object. When an object is excluded, anything between these markers is ignored.
For a full breakdown, see the klipper G-Code Reference
Known Limitations
Cura and Ideamaker sliced files have all support material as a single non-mesh entity. This means that when canceling an object, it's support will still print. Including support that is inside or built onto the canceled mesh. The Slic3r family (including PrusaSlicer and SuperSlicer) treat support as part of the individual mesh's object, so canceling a mesh cancels it's support as well.
How does it work
This looks for known markers inside the GCode, specific to each slicer. It uses those
to figure out the printing object's name, and track's all extrusion moves within it's
print movements. Those are used to calculate a minimal bounding box for each mesh.
A series of EXCLUDE_OBJECT_DEFINE gcodes are placed in a header, including the bounding boxes
and objects centers. Then, these markers are used to place EXCLUDE_OBJECT_START and
EXCLUDE_OBJECT_END gcodes in the file surrounding each set of extrusions for that object.
Metadata
Release files for preprocess_cancellation 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| preprocess_cancellation-0.2.1.tar.gz | 18.0 kB | Without provenance | Details for preprocess_cancellation-0.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| preprocess_cancellation-0.2.1-py3-none-any.whl | Python 3 | none | any | Details for preprocess_cancellation-0.2.1-py3-none-any.whl |
Total release size: 36.9 kB
Release files / preprocess_cancellation-0.2.1.tar.gz
| Download URL | preprocess_cancellation-0.2.1.tar.gz |
|---|---|
| Size | 18.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e2f1224e1ba1603bdfdbf6937caaf91082dc849e5122e80a5328aa999433ce79
|
|
BLAKE2b-256 checksum How to use checksums |
4a567e18b0336c1e6c6622411dd0d3a7634b171e4d156a13b1ceaa048682454a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.7.1 CPython/3.12.0 Windows/11
|
Release files / preprocess_cancellation-0.2.1-py3-none-any.whl
| Download URL | preprocess_cancellation-0.2.1-py3-none-any.whl |
|---|---|
| Size | 18.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1b7e7f63057d09d3f85bd545c28700afdadc350be3380a1f7e5ff9f4cefea129
|
|
BLAKE2b-256 checksum How to use checksums |
3224498d0e7fffbe3da1b2d1495f5b901a34768cb3d55e74da862635757139be
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.7.1 CPython/3.12.0 Windows/11
|
Security for preprocess_cancellation 0.2.1
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.