mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-16 21:42:43 +00:00
Part 2.7: Add G-code back-transform and tree support belt floor clipping
- Add BeltBackTransform class that inverts the shear/scale matrix and applies it in GCodeWriter::to_machine_coords() so G-code outputs in the machine's physical coordinate space, gated by new belt_gcode_back_transform config option - Extend belt floor clipping to all three tree support pipelines (Prusa-style, Orca organic, TreeModelVolumes) with per-layer polygon clipping, anti-overhang integration, and belt raft extension layers - Fix tree drop_nodes() belt termination, organic support global Z offset, collision calculation index bug, and first-layer brim/empty layer checks for belt printers two-shot - first build built but didn't plumb to UI. Woah. add pre-slice axis remap, because Y needs to be Z going to change tactic and move based on bbox min switch to per axis snapping per axis swap snap now per object build plate tilt wasn't invalidating slicer settings support upper bound now correct, need to get lower bound corrected axis swapped support termination corrected Z Shear works with and without pre-slice remap now
This commit is contained in:
+37
-2
@@ -4432,12 +4432,41 @@ void TabPrinter::build_fff()
|
||||
optgroup->append_line(line);
|
||||
}
|
||||
{
|
||||
Line line = { L("G-code axis remap"), L("Remap slicing-frame axes to machine axes in G-code output") };
|
||||
Line line = { L("Pre-slice axis remap"),
|
||||
L("Remap model axes before slicing so the slicer's coordinate system matches "
|
||||
"the physical bed orientation. For belt printers whose bed is NOT in the XY plane, "
|
||||
"use this to swap axes so layers are stacked in the correct physical direction.") };
|
||||
line.append_option(optgroup->get_option("belt_preslice_remap_x"));
|
||||
line.append_option(optgroup->get_option("belt_preslice_remap_y"));
|
||||
line.append_option(optgroup->get_option("belt_preslice_remap_z"));
|
||||
optgroup->append_line(line);
|
||||
}
|
||||
{
|
||||
Line line = { L("G-code axis remap (post-slice)"), L("Remap slicing-frame axes to machine axes in G-code output. Applied AFTER slicing, during G-code generation.") };
|
||||
line.append_option(optgroup->get_option("belt_gcode_remap_x"));
|
||||
line.append_option(optgroup->get_option("belt_gcode_remap_y"));
|
||||
line.append_option(optgroup->get_option("belt_gcode_remap_z"));
|
||||
optgroup->append_line(line);
|
||||
}
|
||||
optgroup->append_single_option_line("belt_gcode_back_transform");
|
||||
{
|
||||
Line line = { L("Origin snap X"), L("Snap object bbox min X to offset in G-code output") };
|
||||
line.append_option(optgroup->get_option("belt_origin_snap_x"));
|
||||
line.append_option(optgroup->get_option("belt_origin_offset_x"));
|
||||
optgroup->append_line(line);
|
||||
}
|
||||
{
|
||||
Line line = { L("Origin snap Y"), L("Snap object bbox min Y to offset in G-code output") };
|
||||
line.append_option(optgroup->get_option("belt_origin_snap_y"));
|
||||
line.append_option(optgroup->get_option("belt_origin_offset_y"));
|
||||
optgroup->append_line(line);
|
||||
}
|
||||
{
|
||||
Line line = { L("Origin snap Z"), L("Snap object bbox min Z to offset in G-code output") };
|
||||
line.append_option(optgroup->get_option("belt_origin_snap_z"));
|
||||
line.append_option(optgroup->get_option("belt_origin_offset_z"));
|
||||
optgroup->append_line(line);
|
||||
}
|
||||
{
|
||||
Line line = { L("Support floor"), L("Belt floor awareness for support generation and clipping") };
|
||||
line.append_option(optgroup->get_option("belt_support_floor_mode"));
|
||||
@@ -5292,7 +5321,9 @@ void TabPrinter::toggle_options()
|
||||
toggle_line("belt_printer_infinite_y", is_belt);
|
||||
for (auto el : {"belt_shear_x", "belt_shear_y", "belt_shear_z",
|
||||
"belt_scale_x", "belt_scale_y", "belt_scale_z",
|
||||
"belt_gcode_remap_x"})
|
||||
"belt_preslice_remap_x",
|
||||
"belt_gcode_remap_x", "belt_gcode_back_transform",
|
||||
"belt_origin_snap_x", "belt_origin_snap_y", "belt_origin_snap_z"})
|
||||
toggle_line(el, is_belt);
|
||||
|
||||
// Gray out angle/from sub-options when their parent shear/scale mode is None.
|
||||
@@ -5320,6 +5351,10 @@ void TabPrinter::toggle_options()
|
||||
auto scz = m_config->option<ConfigOptionEnum<BeltScaleMode>>("belt_scale_z")->value;
|
||||
toggle_option("belt_scale_z_angle", is_belt && scz != BeltScaleMode::None);
|
||||
|
||||
toggle_option("belt_origin_offset_x", is_belt && m_config->opt_bool("belt_origin_snap_x"));
|
||||
toggle_option("belt_origin_offset_y", is_belt && m_config->opt_bool("belt_origin_snap_y"));
|
||||
toggle_option("belt_origin_offset_z", is_belt && m_config->opt_bool("belt_origin_snap_z"));
|
||||
|
||||
toggle_line("belt_support_floor_mode", is_belt);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user