WIP: Reworked slicing

1) Slicing code moved to TriangleMeshSlicer.cpp,hpp from TriangleMesh.cpp,hpp
2) Refactored to use as little as possible of admesh.
This commit is contained in:
Vojtech Bubnik 2021-05-17 20:25:59 +02:00
parent 68d2427a34
commit 308d6b7809
24 changed files with 1828 additions and 1594 deletions

View file

@ -2,6 +2,7 @@
#include <libslic3r/OpenVDBUtils.hpp>
#include <libslic3r/TriangleMesh.hpp>
#include <libslic3r/TriangleMeshSlicer.hpp>
#include <libslic3r/SLA/Hollowing.hpp>
#include <libslic3r/SLA/IndexedMesh.hpp>
#include <libslic3r/ClipperUtils.hpp>
@ -296,10 +297,8 @@ void cut_drainholes(std::vector<ExPolygons> & obj_slices,
mesh.require_shared_vertices();
TriangleMeshSlicer slicer(&mesh);
std::vector<ExPolygons> hole_slices;
slicer.slice(slicegrid, SlicingMode::Regular, closing_radius, &hole_slices, thr);
slice_mesh(mesh, slicegrid, closing_radius, hole_slices, thr);
if (obj_slices.size() != hole_slices.size())
BOOST_LOG_TRIVIAL(warning)