Fix unsliced objects when their dimensions are close to bed limits

fixes #6823
This commit is contained in:
tamasmeszaros 2021-08-26 13:39:22 +02:00
parent 95e4ab9460
commit 9cffbc929e

View File

@ -2915,6 +2915,7 @@ void Plater::priv::update_print_volume_state()
BoundingBox bed_box_2D = get_extents(Polygon::new_scale(this->config->opt<ConfigOptionPoints>("bed_shape")->values)); BoundingBox bed_box_2D = get_extents(Polygon::new_scale(this->config->opt<ConfigOptionPoints>("bed_shape")->values));
BoundingBoxf3 print_volume(unscale(bed_box_2D.min(0), bed_box_2D.min(1), 0.0), unscale(bed_box_2D.max(0), bed_box_2D.max(1), scale_(this->config->opt_float("max_print_height")))); BoundingBoxf3 print_volume(unscale(bed_box_2D.min(0), bed_box_2D.min(1), 0.0), unscale(bed_box_2D.max(0), bed_box_2D.max(1), scale_(this->config->opt_float("max_print_height"))));
// Allow the objects to protrude below the print bed, only the part of the object above the print bed will be sliced. // Allow the objects to protrude below the print bed, only the part of the object above the print bed will be sliced.
print_volume.offset(BedEpsilon);
print_volume.min(2) = -1e10; print_volume.min(2) = -1e10;
this->q->model().update_print_volume_state(print_volume); this->q->model().update_print_volume_state(print_volume);
} }