Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbubnikv <bubnikv@gmail.com>2017-04-05 09:57:37 +0300
committerbubnikv <bubnikv@gmail.com>2017-04-05 09:57:37 +0300
commit329f0b9cf4dc8be2d09413294554515ec7ae891c (patch)
tree992c00f7c5247e2993edbb1acaae28d0fa6168b0 /xs/src/libslic3r/TriangleMesh.cpp
parentbd9ee88e2fa695aed43915e4df2c328a664034d4 (diff)
Debugging output and asserts for TriangleMeshSlicer::slice().
Diffstat (limited to 'xs/src/libslic3r/TriangleMesh.cpp')
-rw-r--r--xs/src/libslic3r/TriangleMesh.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/xs/src/libslic3r/TriangleMesh.cpp b/xs/src/libslic3r/TriangleMesh.cpp
index f58b9f3e1..b7cdacfa4 100644
--- a/xs/src/libslic3r/TriangleMesh.cpp
+++ b/xs/src/libslic3r/TriangleMesh.cpp
@@ -696,6 +696,22 @@ TriangleMeshSlicer::slice(const std::vector<float> &z, std::vector<Polygons>* la
}
);
BOOST_LOG_TRIVIAL(debug) << "TriangleMeshSlicer::slice finished";
+
+#ifdef SLIC3R_DEBUG
+ {
+ static int iRun = 0;
+ for (size_t i = 0; i < z.size(); ++ i) {
+ Polygons &polygons = (*layers)[i];
+ SVG::export_expolygons(debug_out_path("slice_%d_%d.svg", iRun, i).c_str(), union_ex(polygons, true));
+ for (Polygon &poly : polygons) {
+ for (size_t i = 1; i < poly.points.size(); ++ i)
+ assert(poly.points[i-1] != poly.points[i]);
+ assert(poly.points.front() != poly.points.back());
+ }
+ }
+ ++ iRun;
+ }
+#endif
}
void TriangleMeshSlicer::_slice_do(size_t facet_idx, std::vector<IntersectionLines>* lines, boost::mutex* lines_mutex,