mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-10-10 17:21:10 +00:00
fix(imex): hide secondary carriages in g-code preview when firmware-managed-zones is on
The firmware-managed-zones writer offset centers the slice at bed origin, so prim_pos and the preview toolpaths sit in a shifted frame relative to the plate-local bed bounds the secondary-marker zone math uses. Computing secondaries against unshifted bed bounds puts them off the build plate. Skip the secondary-marker / toolhead-box computation when the firmware-managed-zones option is enabled. The firmware physically fans the centered toolpath out into the zones at print time, so the honest preview is the single centered toolpath with no secondaries. Reported by @Felix14-v2 on PR #13086.
This commit is contained in:
@@ -1644,7 +1644,16 @@ void GCodeViewer::render(int canvas_width, int canvas_height, int right_margin)
|
||||
m_imex_last_mode = mode;
|
||||
}
|
||||
|
||||
if (!mode.empty() && mode != kImexPrimaryMode) {
|
||||
// Firmware-managed-zones centers the slice at bed origin, so prim_pos
|
||||
// and the preview toolpaths sit in a shifted frame relative to the
|
||||
// plate-local bed bounds the zone math uses. Computing secondaries here
|
||||
// would place them off-bed. The firmware physically fans the centered
|
||||
// toolpath out into the zones, so the centered preview with no
|
||||
// secondaries is the honest representation.
|
||||
auto* fw_opt = printer_cfg.opt<ConfigOptionBool>("imex_firmware_managed_zones");
|
||||
const bool firmware_managed = fw_opt && fw_opt->value;
|
||||
|
||||
if (!firmware_managed && !mode.empty() && mode != kImexPrimaryMode) {
|
||||
auto* mode_names_opt = printer_cfg.opt<ConfigOptionStrings>("imex_mode_names");
|
||||
auto* active_tools_opt = printer_cfg.opt<ConfigOptionStrings>("imex_mode_active_tools");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user