From 4374716bfb45fc1dfa0af37bbc5836dce4da012a Mon Sep 17 00:00:00 2001 From: tamasmeszaros Date: Tue, 2 Mar 2021 18:25:24 +0100 Subject: [PATCH] Triangle trimming should handle drilled meshes separately --- src/libslic3r/SLAPrintSteps.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/libslic3r/SLAPrintSteps.cpp b/src/libslic3r/SLAPrintSteps.cpp index 4637aa761..036fed171 100644 --- a/src/libslic3r/SLAPrintSteps.cpp +++ b/src/libslic3r/SLAPrintSteps.cpp @@ -169,10 +169,10 @@ void SLAPrint::Steps::drill_holes(SLAPrintObject &po) sla::hollow_mesh(hollowed_mesh, *po.m_hollowing_data->interior); TriangleMesh &mesh_view = po.m_hollowing_data->hollow_mesh_with_holes_trimmed; - mesh_view = po.transformed_mesh(); - sla::hollow_mesh(mesh_view, *po.m_hollowing_data->interior, sla::hfRemoveInsideTriangles); if (! needs_drilling) { + mesh_view = po.transformed_mesh(); + sla::hollow_mesh(mesh_view, *po.m_hollowing_data->interior, sla::hfRemoveInsideTriangles); BOOST_LOG_TRIVIAL(info) << "Drilling skipped (no holes)."; return; } @@ -200,6 +200,9 @@ void SLAPrint::Steps::drill_holes(SLAPrintObject &po) try { MeshBoolean::cgal::minus(*hollowed_mesh_cgal, *holes_mesh_cgal); hollowed_mesh = MeshBoolean::cgal::cgal_to_triangle_mesh(*hollowed_mesh_cgal); + + mesh_view = hollowed_mesh; + sla::remove_inside_triangles(mesh_view, *po.m_hollowing_data->interior); } catch (const std::runtime_error &) { throw Slic3r::SlicingError(L( "Drilling holes into the mesh failed. "