SLA gizmo can be activated if the supports are outside the bed

Otherwise there is a possibility that the object gets out of bed when the gizmo is active (supports are generated with object close to the edge), which the gizmo does not expect
This commit is contained in:
Lukas Matena 2019-03-20 15:35:43 +01:00
parent 42c5d624cb
commit 8b73608e9f

View file

@ -691,10 +691,10 @@ bool GLGizmoSlaSupports::on_is_activable(const Selection& selection) const
|| !selection.is_from_single_instance()) || !selection.is_from_single_instance())
return false; return false;
// Check that none of the selected volumes is outside. // Check that none of the selected volumes is outside. Only SLA auxiliaries (supports) are allowed outside.
const Selection::IndicesList& list = selection.get_volume_idxs(); const Selection::IndicesList& list = selection.get_volume_idxs();
for (const auto& idx : list) for (const auto& idx : list)
if (selection.get_volume(idx)->is_outside) if (selection.get_volume(idx)->is_outside && selection.get_volume(idx)->composite_id.volume_id >= 0)
return false; return false;
return true; return true;