OrcaSlicer always generates Marlin-style object exclusion comments (M486) even when G-code flavor is set to Klipper #14

Open
opened 2026-04-05 16:18:09 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @robertoSreis on 4/3/2026

Is there an existing issue for this problem?

  • I have searched the existing issues

OrcaSlicer Version

2.3.2

Operating System (OS)

Windows

OS Version

11

Additional system information

Xeon E5 2680V4
DDR4 64Gb
VGA: 8GB

Printer

Creality Hi, Creality K1, Creality ender with duet firmware and Anycubic Kobra S1C

How to reproduce

Description:

When adding a printer in OrcaSlicer and setting the G-code flavor to Klipper, the expected behavior is that the comments used for object exclusion (e.g., to ignore objects during printing) should follow the Klipper/GoKlipper format. Currently, regardless of the selected firmware, OrcaSlicer always generates Marlin-style comments.

Klipper and GoKlipper do not recognize the M486 commands, as these are specific to Marlin and Repetier. Additionally, the required object definitions (e.g., CENTER/POLYGON via DEFINE) are missing.

Current Situation & Required Changes:

The following Marlin-style outputs need to be converted to the Klipper EXCLUDE_OBJECT format:

Object names/indexes – already present in the header:
M486 S0 A"Cubo_id_0_copy_0"

CENTER and POLYGON – these must be calculated by scanning the XY coordinates of each block from M486 Sn to M486 S-1 across all layers (bounding box).

Marker positions – conversion mapping:

M486 Sn → EXCLUDE_OBJECT_START

M486 S-1 → EXCLUDE_OBJECT_END

Important: the END marker should be placed exactly where M486 S-1 occurs (not at ; stop printing), ensuring that the wipe move is still associated with the current object.

Current Workaround (outside OrcaSlicer):

I am currently converting these G-code files externally in my app that enables the Anycubic S1 Combo to work with OrcaSlicer (similar to a plugin/workbench). More details:

Website: www.se3d.com.br/

Project page: https://se3d.com.br/anyconnect/

I plan to implement a converter directly in the code, but ideally this redundant processing should not be necessary, since OrcaSlicer already isolates objects internally. It would be much better to avoid this extra conversion step and simply generate the correct Klipper-style output from the start.

Additional Context (optional):

Here's a video of the first version (already outdated – current version is far more advanced and published on my GitHub):
https://studio.youtube.com/video/8egl_0L-9c0/edit

Actual results

After slicing with the G-code flavor set to Klipper, OrcaSlicer still generates Marlin-style object exclusion comments (M486 commands) instead of the expected Klipper/GoKlipper EXCLUDE_OBJECT format.

Specifically:

The output contains M486 S0 A"object_name" in the header, but no DEFINE with CENTER or POLYGON is generated.

Throughout the G-code, markers appear as:

M486 Sn (start of object)

M486 S-1 (end of object)

Klipper and GoKlipper do not recognize these M486 commands, so object exclusion (e.g., skipping a failed object during print) does not work at all. The firmware simply ignores the markers.

Example of generated G-code (incorrect for Klipper):

M486 S0 A"Cubo_id_0_copy_0"
...
M486 S1
... (object geometry)
M486 S-1

Expected results

Expected (correct) Klipper format:

EXCLUDE_OBJECT_DEFINE NAME="Cubo_id_0_copy_0" CENTER=x,y POLYGON=...
...
EXCLUDE_OBJECT_START NAME="Cubo_id_0_copy_0"
... (object geometry)
EXCLUDE_OBJECT_END NAME="Cubo_id_0_copy_0"

Project file & Debug log uploads

just generate a gcode setting klipper on gcode configuration.

Checklist of files to include

  • Log file
  • Project file

Anything else?

No response

*Originally created by @robertoSreis on 4/3/2026* ### Is there an existing issue for this problem? - [x] I have searched the existing issues ### OrcaSlicer Version 2.3.2 ### Operating System (OS) Windows ### OS Version 11 ### Additional system information Xeon E5 2680V4 DDR4 64Gb VGA: 8GB ### Printer Creality Hi, Creality K1, Creality ender with duet firmware and Anycubic Kobra S1C ### How to reproduce Description: When adding a printer in OrcaSlicer and setting the G-code flavor to Klipper, the expected behavior is that the comments used for object exclusion (e.g., to ignore objects during printing) should follow the Klipper/GoKlipper format. Currently, regardless of the selected firmware, OrcaSlicer always generates Marlin-style comments. Klipper and GoKlipper do not recognize the M486 commands, as these are specific to Marlin and Repetier. Additionally, the required object definitions (e.g., CENTER/POLYGON via DEFINE) are missing. Current Situation & Required Changes: The following Marlin-style outputs need to be converted to the Klipper EXCLUDE_OBJECT format: Object names/indexes – already present in the header: M486 S0 A"Cubo_id_0_copy_0" CENTER and POLYGON – these must be calculated by scanning the XY coordinates of each block from M486 Sn to M486 S-1 across all layers (bounding box). Marker positions – conversion mapping: M486 Sn → EXCLUDE_OBJECT_START M486 S-1 → EXCLUDE_OBJECT_END Important: the END marker should be placed exactly where M486 S-1 occurs (not at ; stop printing), ensuring that the wipe move is still associated with the current object. Current Workaround (outside OrcaSlicer): I am currently converting these G-code files externally in my app that enables the Anycubic S1 Combo to work with OrcaSlicer (similar to a plugin/workbench). More details: Website: [www.se3d.com.br/](https://www.se3d.com.br/) Project page: https://se3d.com.br/anyconnect/ I plan to implement a converter directly in the code, but ideally this redundant processing should not be necessary, since OrcaSlicer already isolates objects internally. It would be much better to avoid this extra conversion step and simply generate the correct Klipper-style output from the start. Additional Context (optional): Here's a video of the first version (already outdated – current version is far more advanced and published on my GitHub): https://studio.youtube.com/video/8egl_0L-9c0/edit ### Actual results After slicing with the G-code flavor set to Klipper, OrcaSlicer still generates Marlin-style object exclusion comments (M486 commands) instead of the expected Klipper/GoKlipper EXCLUDE_OBJECT format. Specifically: The output contains M486 S0 A"object_name" in the header, but no DEFINE with CENTER or POLYGON is generated. Throughout the G-code, markers appear as: M486 Sn (start of object) M486 S-1 (end of object) Klipper and GoKlipper do not recognize these M486 commands, so object exclusion (e.g., skipping a failed object during print) does not work at all. The firmware simply ignores the markers. **Example of generated G-code (incorrect for Klipper):** M486 S0 A"Cubo_id_0_copy_0" ... M486 S1 ... (object geometry) M486 S-1 ### Expected results **Expected (correct) Klipper format:** EXCLUDE_OBJECT_DEFINE NAME="Cubo_id_0_copy_0" CENTER=x,y POLYGON=... ... EXCLUDE_OBJECT_START NAME="Cubo_id_0_copy_0" ... (object geometry) EXCLUDE_OBJECT_END NAME="Cubo_id_0_copy_0" ### Project file & Debug log uploads just generate a gcode setting klipper on gcode configuration. ### Checklist of files to include - [ ] Log file - [ ] Project file ### Anything else? _No response_
MrUnknownDE added the bugbugbugbugbugbug labels 2026-04-05 16:18:09 +02:00
Sign in to join this conversation.
No Label bug bug bug bug bug bug
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/OrcaSlicer#14