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

@ -3,6 +3,7 @@
%{
#include <xsinit.h>
#include "libslic3r/TriangleMesh.hpp"
#include "libslic3r/TriangleMeshSlicer.hpp"
%}
%name{Slic3r::TriangleMesh} class TriangleMesh {
@ -181,8 +182,7 @@ TriangleMesh::slice(z)
std::vector<float> z_f = cast<float>(z);
std::vector<ExPolygons> layers;
TriangleMeshSlicer mslicer(THIS);
mslicer.slice(z_f, SlicingMode::Regular, 0.049f, &layers, [](){});
slice_mesh(*THIS, z_f, 0.049f, layers);
AV* layers_av = newAV();
size_t len = layers.size();