Fix of detection of the out of bed state for sinking objects in backend

This commit is contained in:
enricoturri1966 2021-09-17 14:47:19 +02:00
parent 6d70ada637
commit 92bf9a664d

View file

@ -1545,7 +1545,11 @@ unsigned int ModelObject::check_instances_print_volume_state(const BoundingBoxf3
unsigned int inside_outside = 0;
for (const ModelVolume *vol : this->volumes)
if (vol->is_model_part()) {
#if ENABLE_FIX_SINKING_OBJECT_OUT_OF_BED_DETECTION
BoundingBoxf3 bb = vol->mesh().transformed_bounding_box(model_instance->get_matrix() * vol->get_matrix(), 0.0);
#else
BoundingBoxf3 bb = vol->get_convex_hull().transformed_bounding_box(model_instance->get_matrix() * vol->get_matrix());
#endif // ENABLE_FIX_SINKING_OBJECT_OUT_OF_BED_DETECTION
if (print_volume.contains(bb))
inside_outside |= INSIDE;
else if (print_volume.intersects(bb))