mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-08-03 12:04:05 -06:00
Fix of detection of the out of bed state for sinking objects in backend
This commit is contained in:
parent
6d70ada637
commit
92bf9a664d
1 changed files with 4 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue