mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-15 18:58:00 -06:00
SlaSupports gizmo - show holes position even when user did not Preview the drilled mesh
This commit is contained in:
parent
49c5822be4
commit
58b5e75a9c
3 changed files with 9 additions and 4 deletions
|
@ -335,7 +335,7 @@ void GLGizmoSlaSupports::render_points(const Selection& selection, bool picking)
|
|||
}
|
||||
|
||||
// Now render the drain holes:
|
||||
/*if (! m_c->m_cavity_mesh) {
|
||||
if (! m_c->has_drilled_mesh()) {
|
||||
render_color[0] = 0.7f;
|
||||
render_color[1] = 0.7f;
|
||||
render_color[2] = 0.7f;
|
||||
|
@ -370,7 +370,7 @@ void GLGizmoSlaSupports::render_points(const Selection& selection, bool picking)
|
|||
glFrontFace(GL_CCW);
|
||||
glsafe(::glPopMatrix());
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
if (!picking)
|
||||
glsafe(::glDisable(GL_LIGHTING));
|
||||
|
@ -414,14 +414,14 @@ bool GLGizmoSlaSupports::unproject_on_mesh(const Vec2d& mouse_pos, std::pair<Vec
|
|||
// In case the hollowed and drilled mesh is available, we can allow
|
||||
// placing points in holes, because they should never end up
|
||||
// on surface that's been drilled away.
|
||||
/*if (! m_c->m_cavity_mesh) {
|
||||
if (! m_c->has_drilled_mesh()) {
|
||||
for (const sla::DrainHole& hole : m_c->m_model_object->sla_drain_holes) {
|
||||
if (hole.is_inside(hit)) {
|
||||
in_hole = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}*/
|
||||
}
|
||||
if (! in_hole) {
|
||||
// Return both the point and the facet normal.
|
||||
pos_and_normal = std::make_pair(hit, normal);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue