mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-21 21:58:03 -06:00
AABB trees for SLA gizmos are not calculated when the object is selected, but only after one of the gizmos is opened
This commit is contained in:
parent
487ac0423e
commit
4df6a645f2
5 changed files with 38 additions and 20 deletions
|
@ -371,13 +371,7 @@ bool CommonGizmosData::update_from_backend(GLCanvas3D& canvas, ModelObject* mode
|
|||
m_model_object_id = m_model_object->id();
|
||||
|
||||
if (m_mesh != m_old_mesh) {
|
||||
wxBusyCursor wait;
|
||||
m_mesh_raycaster.reset(new MeshRaycaster(*m_mesh));
|
||||
m_object_clipper.reset();
|
||||
m_supports_clipper.reset();
|
||||
m_old_mesh = m_mesh;
|
||||
m_clipping_plane_distance = 0.f;
|
||||
m_clipping_plane_distance_stash = 0.f;
|
||||
m_schedule_aabb_calculation = true;
|
||||
recent_update = true;
|
||||
return true;
|
||||
}
|
||||
|
@ -388,6 +382,21 @@ bool CommonGizmosData::update_from_backend(GLCanvas3D& canvas, ModelObject* mode
|
|||
}
|
||||
|
||||
|
||||
void CommonGizmosData::build_AABB_if_needed()
|
||||
{
|
||||
if (! m_schedule_aabb_calculation)
|
||||
return;
|
||||
|
||||
wxBusyCursor wait;
|
||||
m_mesh_raycaster.reset(new MeshRaycaster(*m_mesh));
|
||||
m_object_clipper.reset();
|
||||
m_supports_clipper.reset();
|
||||
m_old_mesh = m_mesh;
|
||||
m_clipping_plane_distance = 0.f;
|
||||
m_clipping_plane_distance_stash = 0.f;
|
||||
m_schedule_aabb_calculation = false;
|
||||
}
|
||||
|
||||
|
||||
} // namespace GUI
|
||||
} // namespace Slic3r
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue