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/SLA/SpatIndex.hpp>
#include <libslic3r/SLA/BoostAdapter.hpp>
#include <libslic3r/SLA/Contour3D.hpp>
#include <libslic3r/TriangleMeshSlicer.hpp>
#include "ConcaveHull.hpp"
@ -476,10 +477,9 @@ void pad_blueprint(const TriangleMesh & mesh,
ThrowOnCancel thrfn)
{
if (mesh.empty()) return;
TriangleMeshSlicer slicer(&mesh);
auto out = reserve_vector<ExPolygons>(heights.size());
slicer.slice(heights, SlicingMode::Regular, 0.f, &out, thrfn);
slice_mesh(mesh, heights, out, thrfn);
size_t count = 0;
for(auto& o : out) count += o.size();