diff --git a/src/libslic3r/SLA/Hollowing.cpp b/src/libslic3r/SLA/Hollowing.cpp index c4a616d93..0dd9436a1 100644 --- a/src/libslic3r/SLA/Hollowing.cpp +++ b/src/libslic3r/SLA/Hollowing.cpp @@ -97,7 +97,7 @@ std::unique_ptr generate_interior(const TriangleMesh & mesh, _generate_interior(mesh, ctl, hc.min_thickness, voxel_scale, hc.closing_distance)); - if (meshptr) { + if (meshptr && !meshptr->empty()) { // This flips the normals to be outward facing... meshptr->require_shared_vertices(); diff --git a/src/libslic3r/SLA/ReprojectPointsOnMesh.hpp b/src/libslic3r/SLA/ReprojectPointsOnMesh.hpp index fa919a117..702d1bce1 100644 --- a/src/libslic3r/SLA/ReprojectPointsOnMesh.hpp +++ b/src/libslic3r/SLA/ReprojectPointsOnMesh.hpp @@ -28,17 +28,25 @@ void reproject_support_points(const EigenMesh3D &mesh, std::vector &p inline void reproject_points_and_holes(ModelObject *object) { bool has_sppoints = !object->sla_support_points.empty(); - bool has_holes = !object->sla_drain_holes.empty(); - if (!object || (!has_holes && !has_sppoints)) return; + // Disabling reprojection of holes as they have a significant offset away + // from the model body which tolerates minor geometrical changes. + // + // TODO: uncomment and ensure the right offset of the hole points if + // reprojection would still be necessary. + // bool has_holes = !object->sla_drain_holes.empty(); - EigenMesh3D emesh{object->raw_mesh()}; + if (!object || (/*!has_holes &&*/ !has_sppoints)) return; + + TriangleMesh rmsh = object->raw_mesh(); + rmsh.require_shared_vertices(); + EigenMesh3D emesh{rmsh}; if (has_sppoints) reproject_support_points(emesh, object->sla_support_points); - if (has_holes) - reproject_support_points(emesh, object->sla_drain_holes); +// if (has_holes) +// reproject_support_points(emesh, object->sla_drain_holes); } }}