mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-09 10:16:50 +00:00
FIX:add set_only_support_model_part_flag api for support negative_volume and so on in boolean gizmo
jira: none Change-Id: Id4bc54ff27652b587227c98c8fb4dc27c34da666 (cherry picked from commit 512012c8d2aaf5f91748b2b6cf9a491ca351d5cc)
This commit is contained in:
@@ -59,6 +59,10 @@ InstancesHider* CommonGizmosDataPool::instances_hider() const
|
||||
return inst_hider->is_valid() ? inst_hider : nullptr;
|
||||
}
|
||||
|
||||
CommonGizmosDataObjects::Raycaster *CommonGizmosDataPool::raycaster_ptr() {
|
||||
return dynamic_cast<Raycaster *>(m_data.at(CommonGizmosDataID::Raycaster).get());
|
||||
}
|
||||
|
||||
Raycaster* CommonGizmosDataPool::raycaster() const
|
||||
{
|
||||
Raycaster* rc = dynamic_cast<Raycaster*>(m_data.at(CommonGizmosDataID::Raycaster).get());
|
||||
@@ -220,8 +224,13 @@ void Raycaster::on_update()
|
||||
std::vector<const TriangleMesh*> meshes;
|
||||
const std::vector<ModelVolume*>& mvs = mo->volumes;
|
||||
for (const ModelVolume* mv : mvs) {
|
||||
if (mv->is_model_part())
|
||||
if (m_only_support_model_part) {
|
||||
if (mv->is_model_part()) {
|
||||
meshes.push_back(&mv->mesh());
|
||||
}
|
||||
} else {
|
||||
meshes.push_back(&mv->mesh());
|
||||
}
|
||||
}
|
||||
|
||||
if (meshes != m_old_meshes) {
|
||||
@@ -246,6 +255,9 @@ std::vector<const MeshRaycaster*> Raycaster::raycasters() const
|
||||
return mrcs;
|
||||
}
|
||||
|
||||
void CommonGizmosDataObjects::Raycaster::set_only_support_model_part_flag(bool flag) {
|
||||
m_only_support_model_part = flag;
|
||||
}
|
||||
|
||||
void ObjectClipper::on_update()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user