mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-10-09 00:31:19 +00:00
Belt G-code: correct the first-layer point test comment
The comment said the lambda takes off "the instance part" of m_origin. On a belt m_origin has been rotated by on_set_origin() by then, so m_origin minus the plate offset is not the instance shift. Say what the code does: undo what point_to_gcode() added and what the writer took off. Comment only. Reported by raistlin7447 in the review of #14394. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
d29e3be0a0
commit
679638fca3
@@ -3173,8 +3173,8 @@ void GCode::_do_export(Print& print, GCodeOutputStream &file, ThumbnailsGenerato
|
||||
if (print.config().belt_printer.value) {
|
||||
m_writer.set_first_layer_point_test([this](const Vec3d &point_logical) {
|
||||
const Vec2d extruder_offset = m_writer.filament() != nullptr ? EXTRUDER_CONFIG(extruder_offset) : Vec2d::Zero();
|
||||
// The writer hands over the point with the plate origin (its XY offset) already
|
||||
// taken off, while m_origin still carries it: take off the instance part only.
|
||||
// Undo what point_to_gcode() added (m_origin, minus the extruder offset) and
|
||||
// what the writer then took off (its XY offset, the plate origin).
|
||||
const Vec2d plate_offset = m_writer.get_xy_offset().cast<double>();
|
||||
return this->on_first_layer(Vec3d(point_logical.x() - (m_origin.x() - plate_offset.x()) + extruder_offset.x(),
|
||||
point_logical.y() - (m_origin.y() - plate_offset.y()) + extruder_offset.y(),
|
||||
|
||||
Reference in New Issue
Block a user