mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-07-15 23:12:08 +00:00
Merge pull request #44 from tommasobbianchi/feat/belt-skip-height-check
belt: don't reject long objects (skip build-height check on belt printers)
This commit is contained in:
@@ -193,12 +193,11 @@ void BuildVolume::set_belt_printer(bool enabled, double angle_deg, bool infinite
|
||||
// Extend the Y bound to a very large value for infinite belt.
|
||||
m_bboxf.max.y() = 100000.;
|
||||
}
|
||||
// Adjust max print height to diagonal reach: printable_height / sin(belt_angle).
|
||||
if (angle_deg > 0. && angle_deg < 90.) {
|
||||
double sin_a = std::sin(angle_deg * M_PI / 180.0);
|
||||
if (sin_a > 0.)
|
||||
m_bboxf.max.z() = m_max_print_height / sin_a;
|
||||
}
|
||||
// Belt printer: the Z extent already equals printable_height (set above), which
|
||||
// is the usable vertical clearance above the belt. The gantry's axis range is
|
||||
// sized to reach height/cos(tilt), so no diagonal scaling is applied here — this
|
||||
// keeps the live "outside build volume" highlight in agreement with Print::validate().
|
||||
(void) angle_deg;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1406,6 +1406,28 @@ StringObjectException Print::validate(StringObjectException *warning, Polygons*
|
||||
// Checks that the print does not exceed the max print height
|
||||
for (size_t print_object_idx = 0; print_object_idx < m_objects.size(); ++ print_object_idx) {
|
||||
const PrintObject &print_object = *m_objects[print_object_idx];
|
||||
// Belt printer: the sliced (virtual) Z is belt travel along the conveyor, not
|
||||
// build height, so the loop below (which measures the sliced layer stack) is
|
||||
// meaningless here. The real ceiling is the usable vertical clearance above the
|
||||
// belt, which printable_height holds directly: the gantry travels up the tilted
|
||||
// plane, so a part of height z needs gantry reach z / cos(tilt), and the machine's
|
||||
// gantry-axis range is sized to accommodate that (e.g. IdeaFormer IR3 V2: ~354 mm
|
||||
// of gantry travel = 250 mm vertical at 45°, and printable_height = 250). So compare
|
||||
// the upright object height against printable_height directly.
|
||||
if (m_config.belt_printer.value) {
|
||||
const double max_h = m_config.printable_height.value;
|
||||
double obj_top = 0.0;
|
||||
const ModelObject *mo = print_object.model_object();
|
||||
for (const ModelInstance *mi : mo->instances)
|
||||
obj_top = std::max(obj_top, mo->instance_bounding_box(*mi).max.z());
|
||||
if (obj_top > max_h + EPSILON)
|
||||
return StringObjectException{
|
||||
Slic3r::format(_u8L("The object %1% exceeds the maximum printable height "
|
||||
"above the belt (%2% mm)."),
|
||||
print_object.model_object()->name, max_h),
|
||||
print_object.model_object(), "" };
|
||||
continue;
|
||||
}
|
||||
//FIXME It is quite expensive to generate object layers just to get the print height!
|
||||
if (auto layers = generate_object_layers(print_object.slicing_parameters(), layer_height_profile(print_object_idx), print_object.config().precise_z_height.value);
|
||||
!layers.empty()) {
|
||||
|
||||
Reference in New Issue
Block a user