Merge upstream/hanif/belt-printer-fixes into belt/final-round

Brings in upstream/belt-printer (the Sept 14 main merge) plus Hanif Koh's
21 review-fix commits from PR #15685, on top of the MachineKinematics
refactor and the purge-prism / tree-support / first-layer-speed fixes.

Conflict resolution:
- BeltGCodeWriter is gone (kinematics refactor), so Hanif's plate-offset
  fix for it is ported into GCodeWriter: the first-layer-plane checks in
  travel_to_xy / travel_to_xyz / _travel_to_z now evaluate the plate-local
  point, and BeltGCode::init_belt_writer hands the stored plate origin to
  the writer it installs.
- init_belt_writer(Print&) takes Hanif's signature; the BBL flag is set on
  the surviving writer by GCode::_do_export.
- The shared emit_belt_brim_bands() loop keeps the BeltFloorObjectGuard the
  local branch added, so apron bands classify first-layer height against
  their own object.
- eager_lift keeps effective_type: it now carries set_force_normal_lift().
- GCodeWriter's initializer list follows Hanif's member order with
  m_kinematics in its declared position.
- TreeSupport::detect_overhangs uses Hanif's clamped build_plate_tilt_slope()
  for the non-belt path and the belt shear for the belt path.
This commit is contained in:
harrierpigeon
2026-09-30 15:22:19 -05:00
4942 changed files with 62842 additions and 21578 deletions
+4 -9
View File
@@ -6,25 +6,20 @@
namespace Slic3r {
void BeltGCode::init_belt_writer(Print &print, bool is_bbl_printers)
void BeltGCode::init_belt_writer(Print &print)
{
if (!print.config().belt_printer.value)
return;
auto belt_writer = std::make_unique<GCodeWriter>();
belt_writer->set_is_bbl_machine(is_bbl_printers);
// Axis remap and build volume max are set by base GCode after init_belt_writer
// returns; set_kinematics() replays them, so install order does not matter.
install_belt_kinematics(*belt_writer, print.config());
belt_writer->set_force_normal_lift(true);
// The plate origin was stored on the writer this one replaces.
belt_writer->set_xy_offset(m_gcode_offset.x(), m_gcode_offset.y());
m_writer = std::move(belt_writer);
}
void BeltGCode::write_belt_header(GCodeOutputStream &file, const Print &print)
{
if (!print.config().belt_printer.value)
return;
const auto &full_cfg = print.full_print_config();
// Slicing rotation: the belt tilt (axis + angle) and the single source of truth
// for the physical tilt the G-code viewer uses to enable belt view.
@@ -63,7 +58,7 @@ void BeltGCode::on_set_origin(const PrintObject * /*obj*/, const Point & /*inst_
|| (m_config.belt_slice_rotation_global.value
&& m_config.belt_slice_rotation.value != BeltRotationAxis::None
&& std::abs(m_config.belt_slice_rotation_angle.value) > EPSILON);
if (!use_global || !m_config.belt_printer.value)
if (!use_global)
return;
// Adjust origin: transform through belt forward pipeline so that