mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-16 11:17:51 -06:00
Handle sinking object properly
This commit is contained in:
parent
961254b81d
commit
5b1cfa4529
1 changed files with 10 additions and 0 deletions
|
@ -2070,6 +2070,16 @@ bool PartPlate::check_outside(int obj_id, int instance_id, BoundingBoxf3* boundi
|
||||||
if (instance_box.max.z() > plate_box.min.z())
|
if (instance_box.max.z() > plate_box.min.z())
|
||||||
plate_box.min.z() += instance_box.min.z(); // not considering outsize if sinking
|
plate_box.min.z() += instance_box.min.z(); // not considering outsize if sinking
|
||||||
|
|
||||||
|
if (instance_box.min.z() < SINKING_Z_THRESHOLD) {
|
||||||
|
// Orca: For sinking object, we use a more expensive algorithm so part below build plate won't be considered
|
||||||
|
if (plate_box.intersects(instance_box)) {
|
||||||
|
// TODO: FIXME: this does not take exclusion area into account
|
||||||
|
const BuildVolume build_volume(get_shape(), m_plater->build_volume().printable_height());
|
||||||
|
const auto state = instance->calc_print_volume_state(build_volume);
|
||||||
|
outside = state == ModelInstancePVS_Partly_Outside;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
if (plate_box.contains(instance_box))
|
if (plate_box.contains(instance_box))
|
||||||
{
|
{
|
||||||
if (m_exclude_bounding_box.size() > 0)
|
if (m_exclude_bounding_box.size() > 0)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue