mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-10-09 08:41:14 +00:00
Belt: remove dead code
belt_remapped_bbox() had no callers; belt_min_z() and m_belt_global_xy_correction were written but never read; LayerTools::has_belt_brim was set but never read; belt_surface_z was a named zero. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5.1
parent
1fb585dc5c
commit
441113cf3b
@@ -902,7 +902,6 @@ void PrintObject::slice()
|
||||
// them.
|
||||
m_belt_min_z = 0.;
|
||||
m_belt_global_z_offset = 0.;
|
||||
m_belt_global_xy_correction = Vec2d::Zero();
|
||||
this->clear_layers();
|
||||
m_layers = new_layers(this, generate_object_layers(m_slicing_params, layer_height_profile, m_config.precise_z_height.value));
|
||||
this->slice_volumes();
|
||||
@@ -995,7 +994,6 @@ void PrintObject::slice()
|
||||
// couples slicer_z back into both machine_y and machine_z. Compensating
|
||||
// layer.print_z by belt_z_shift here makes the back-transform produce
|
||||
// correct machine-frame coordinates whether or not a global mode is active.
|
||||
const double belt_surface_z = 0.; // the belt surface is Z=0 in centered slicer space
|
||||
// The compensation must mirror the Z-shift actually applied, which
|
||||
// is max(0, -m_belt_min_z): when the transformed mesh starts ABOVE
|
||||
// slicer Z=0 (m_belt_min_z > 0 — possible for counter-rotated or
|
||||
@@ -1003,7 +1001,7 @@ void PrintObject::slice()
|
||||
// no lift was applied, and an unclamped m_belt_min_z here would
|
||||
// leak straight into the layer Z values, floating the whole object
|
||||
// off the belt by exactly that amount.
|
||||
double belt_z_shift = std::min(m_belt_min_z, 0.) - belt_surface_z;
|
||||
double belt_z_shift = std::min(m_belt_min_z, 0.); // the belt surface is Z=0 in centered slicer space
|
||||
double global_z_offset = belt_z_shift;
|
||||
|
||||
// Centering correction: trafo_centered pretranslates by
|
||||
@@ -1034,7 +1032,6 @@ void PrintObject::slice()
|
||||
Vec3d d(unscale<double>(inst_shift.x()), unscale<double>(inst_shift.y()), 0.);
|
||||
Vec3d c = T.linear() * d - d;
|
||||
global_z_offset += c.z();
|
||||
m_belt_global_xy_correction = Vec2d(c.x(), c.y());
|
||||
|
||||
BOOST_LOG_TRIVIAL(trace) << "Belt preslice_global: correction=("
|
||||
<< c.x() << ", " << c.y() << ", " << c.z() << ")"
|
||||
@@ -1042,7 +1039,7 @@ void PrintObject::slice()
|
||||
}
|
||||
|
||||
BOOST_LOG_TRIVIAL(trace) << "Belt global: z_offset=" << global_z_offset
|
||||
<< " (relative to min across " << this->print()->objects().size() << " objects)";
|
||||
<< " (" << this->print()->objects().size() << " objects on the plate)";
|
||||
m_belt_global_z_offset = global_z_offset;
|
||||
if (std::abs(global_z_offset) > EPSILON) {
|
||||
for (Layer *layer : m_layers)
|
||||
|
||||
Reference in New Issue
Block a user