TriangleMeshSlicer: Added tests for checking for non-manifold sets

of contours created by the slicing algorithm.
Currently these tests are disabled as it is known that such situations
may appear.
This commit is contained in:
Vojtech Bubnik 2023-04-14 08:36:47 +02:00
parent 78b00bb9cb
commit adabaccc9e

View File

@ -1911,6 +1911,16 @@ std::vector<ExPolygons> slice_mesh_ex(
this_mode == MeshSlicingParams::SlicingMode::EvenOdd ? ClipperLib::pftEvenOdd :
this_mode == MeshSlicingParams::SlicingMode::PositiveLargestContour ? ClipperLib::pftPositive : ClipperLib::pftNonZero,
&expolygons);
#if 0
//#ifndef _NDEBUG
for (const ExPolygon &ex : expolygons) {
assert(! has_duplicate_points(ex.contour));
for (const Polygon &hole : ex.holes)
assert(! has_duplicate_points(hole));
assert(! has_duplicate_points(ex));
}
assert(!has_duplicate_points(expolygons));
#endif // _NDEBUG
//FIXME simplify
if (this_mode == MeshSlicingParams::SlicingMode::PositiveLargestContour)
keep_largest_contour_only(expolygons);
@ -1921,6 +1931,16 @@ std::vector<ExPolygons> slice_mesh_ex(
append(simplified, ex.simplify(resolution));
expolygons = std::move(simplified);
}
#if 0
//#ifndef _NDEBUG
for (const ExPolygon &ex : expolygons) {
assert(! has_duplicate_points(ex.contour));
for (const Polygon &hole : ex.holes)
assert(! has_duplicate_points(hole));
assert(! has_duplicate_points(ex));
}
assert(! has_duplicate_points(expolygons));
#endif // _NDEBUG
}
});
// BOOST_LOG_TRIVIAL(debug) << "slice_mesh make_expolygons in parallel - end";