ENH: model with a volume but multi-mesh should can be mesh union

As title

Signed-off-by: salt.wei <salt.wei@bambulab.com>
Change-Id: I4cf12198980a9a5a7d8dbbfc49fd5d807ca97902
This commit is contained in:
salt.wei 2023-07-07 14:36:38 +08:00 committed by Lane.Wei
parent f1ef4476dd
commit 89a7cc4ab0
3 changed files with 12 additions and 1 deletions

View file

@ -3076,6 +3076,16 @@ bool ObjectList::can_merge_to_single_object() const
return (*m_objects)[obj_idx]->volumes.size() > 1;
}
bool ObjectList::can_mesh_boolean() const
{
int obj_idx = get_selected_obj_idx();
if (obj_idx < 0)
return false;
// selected object should be multi mesh
return (*m_objects)[obj_idx]->volumes.size() > 1 || ((*m_objects)[obj_idx]->volumes.size() == 1 && (*m_objects)[obj_idx]->volumes[0]->is_splittable());
}
bool ObjectList::has_selected_cut_object() const
{
wxDataViewItemArray sels;