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:
parent
78b00bb9cb
commit
adabaccc9e
1 changed files with 20 additions and 0 deletions
|
@ -1911,6 +1911,16 @@ std::vector<ExPolygons> slice_mesh_ex(
|
||||||
this_mode == MeshSlicingParams::SlicingMode::EvenOdd ? ClipperLib::pftEvenOdd :
|
this_mode == MeshSlicingParams::SlicingMode::EvenOdd ? ClipperLib::pftEvenOdd :
|
||||||
this_mode == MeshSlicingParams::SlicingMode::PositiveLargestContour ? ClipperLib::pftPositive : ClipperLib::pftNonZero,
|
this_mode == MeshSlicingParams::SlicingMode::PositiveLargestContour ? ClipperLib::pftPositive : ClipperLib::pftNonZero,
|
||||||
&expolygons);
|
&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
|
//FIXME simplify
|
||||||
if (this_mode == MeshSlicingParams::SlicingMode::PositiveLargestContour)
|
if (this_mode == MeshSlicingParams::SlicingMode::PositiveLargestContour)
|
||||||
keep_largest_contour_only(expolygons);
|
keep_largest_contour_only(expolygons);
|
||||||
|
@ -1921,6 +1931,16 @@ std::vector<ExPolygons> slice_mesh_ex(
|
||||||
append(simplified, ex.simplify(resolution));
|
append(simplified, ex.simplify(resolution));
|
||||||
expolygons = std::move(simplified);
|
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";
|
// BOOST_LOG_TRIVIAL(debug) << "slice_mesh make_expolygons in parallel - end";
|
||||||
|
|
Loading…
Add table
Reference in a new issue