mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-19 20:57:53 -06:00
Cut: Fix model rendering
This commit is contained in:
parent
3ec927a841
commit
090a9247cb
8 changed files with 151 additions and 63 deletions
|
@ -644,6 +644,28 @@ void Selection::volumes_changed(const std::vector<size_t> &map_volume_old_to_new
|
|||
this->set_bounding_boxes_dirty();
|
||||
}
|
||||
|
||||
bool Selection::is_any_connector() const
|
||||
{
|
||||
const int obj_idx = get_object_idx();
|
||||
|
||||
if ((is_any_volume() || is_any_modifier() || is_mixed()) && // some solid_part AND/OR modifier is selected
|
||||
obj_idx >= 0 && m_model->objects[obj_idx]->is_cut()) {
|
||||
const ModelVolumePtrs& obj_volumes = m_model->objects[obj_idx]->volumes;
|
||||
for (size_t vol_idx = 0; vol_idx < obj_volumes.size(); vol_idx++)
|
||||
if (obj_volumes[vol_idx]->is_cut_connector())
|
||||
for (const GLVolume* v : *m_volumes)
|
||||
if (v->object_idx() == obj_idx && v->volume_idx() == (int)vol_idx && v->selected)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Selection::is_any_cut_volume() const
|
||||
{
|
||||
const int obj_idx = get_object_idx();
|
||||
return is_any_volume() && obj_idx >= 0 && m_model->objects[obj_idx]->is_cut();
|
||||
}
|
||||
|
||||
bool Selection::is_single_full_instance() const
|
||||
{
|
||||
if (m_type == SingleFullInstance)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue