mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-15 17:45:57 +08:00
Fix of detection of the out of bed state for sinking objects in backend
This commit is contained in:
parent
6d70ada637
commit
92bf9a664d
@ -1545,7 +1545,11 @@ unsigned int ModelObject::check_instances_print_volume_state(const BoundingBoxf3
|
|||||||
unsigned int inside_outside = 0;
|
unsigned int inside_outside = 0;
|
||||||
for (const ModelVolume *vol : this->volumes)
|
for (const ModelVolume *vol : this->volumes)
|
||||||
if (vol->is_model_part()) {
|
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());
|
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))
|
if (print_volume.contains(bb))
|
||||||
inside_outside |= INSIDE;
|
inside_outside |= INSIDE;
|
||||||
else if (print_volume.intersects(bb))
|
else if (print_volume.intersects(bb))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user