mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-13 01:37:53 -06:00
Fixed crash related to ClippingPlane and incorrect handling of sla z shift in hollowing gizmo
This commit is contained in:
parent
c704849a7a
commit
535a27de65
5 changed files with 20 additions and 11 deletions
|
@ -395,13 +395,22 @@ bool GLGizmosManager::gizmo_event(SLAGizmoEventType action, const Vec2d& mouse_p
|
|||
|
||||
ClippingPlane GLGizmosManager::get_sla_clipping_plane() const
|
||||
{
|
||||
if (!m_enabled || (m_current != SlaSupports && m_current != Hollow) || m_gizmos.empty())
|
||||
if (! m_common_gizmos_data->object_clipper()
|
||||
|| m_common_gizmos_data->object_clipper()->get_position() == 0.)
|
||||
return ClippingPlane::ClipsNothing();
|
||||
else {
|
||||
const ClippingPlane& clp = *m_common_gizmos_data->object_clipper()->get_clipping_plane();
|
||||
return ClippingPlane(-clp.get_normal(), clp.get_data()[3]);
|
||||
}
|
||||
|
||||
|
||||
/*if (!m_enabled || (m_current != SlaSupports && m_current != Hollow) || m_gizmos.empty())
|
||||
return ClippingPlane::ClipsNothing();
|
||||
|
||||
if (m_current == SlaSupports)
|
||||
return dynamic_cast<GLGizmoSlaSupports*>(m_gizmos[SlaSupports].get())->get_sla_clipping_plane();
|
||||
else
|
||||
return dynamic_cast<GLGizmoHollow*>(m_gizmos[Hollow].get())->get_sla_clipping_plane();
|
||||
return dynamic_cast<GLGizmoHollow*>(m_gizmos[Hollow].get())->get_sla_clipping_plane();*/
|
||||
}
|
||||
|
||||
bool GLGizmosManager::wants_reslice_supports_on_undo() const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue