mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-19 19:33:47 +00:00
Feature/re enable tests (#10503)
* re-enable tests * Add comprehensive testing guide for OrcaSlicer in CLAUDE.md * fix build errors on Win * fix appimage errors
This commit is contained in:
@@ -19,10 +19,12 @@
|
||||
|
||||
using boost::polygon::voronoi_builder;
|
||||
using boost::polygon::voronoi_diagram;
|
||||
using boost::polygon::construct_voronoi;
|
||||
|
||||
using namespace Slic3r;
|
||||
|
||||
using VD = Geometry::VoronoiDiagram;
|
||||
using BoostVD = boost::polygon::voronoi_diagram<double>;
|
||||
|
||||
// https://svn.boost.org/trac10/ticket/12067
|
||||
// This bug seems to be confirmed.
|
||||
@@ -60,7 +62,7 @@ TEST_CASE("Voronoi missing edges - points 12067", "[Voronoi]")
|
||||
#endif
|
||||
|
||||
// Construction of the Voronoi Diagram.
|
||||
VD vd;
|
||||
BoostVD vd;
|
||||
construct_voronoi(pts.begin(), pts.end(), &vd);
|
||||
|
||||
#ifdef VORONOI_DEBUG_OUT
|
||||
@@ -188,7 +190,7 @@ TEST_CASE("Voronoi missing edges - Alessandro gapfill 12707", "[Voronoi]")
|
||||
REQUIRE(intersecting_edges({ poly }).empty());
|
||||
|
||||
Lines lines = to_lines(poly);
|
||||
VD vd;
|
||||
BoostVD vd;
|
||||
construct_voronoi(lines.begin(), lines.end(), &vd);
|
||||
|
||||
#ifdef VORONOI_DEBUG_OUT
|
||||
@@ -295,7 +297,7 @@ TEST_CASE("Voronoi weirdness", "[Voronoi]")
|
||||
}
|
||||
#endif
|
||||
|
||||
VD vd;
|
||||
BoostVD vd;
|
||||
Lines lines = to_lines(poly);
|
||||
construct_voronoi(lines.begin(), lines.end(), &vd);
|
||||
|
||||
@@ -320,7 +322,7 @@ TEST_CASE("Voronoi division by zero 12903", "[Voronoi]")
|
||||
REQUIRE(std::unique(pts2.begin(), pts2.end()) == pts2.end());
|
||||
}
|
||||
|
||||
VD vd;
|
||||
BoostVD vd;
|
||||
construct_voronoi(pts.begin(), pts.end(), &vd);
|
||||
|
||||
#ifdef VORONOI_DEBUG_OUT
|
||||
@@ -1317,7 +1319,7 @@ TEST_CASE("Voronoi NaN coordinates 12139", "[Voronoi][!hide][!mayfail]")
|
||||
}
|
||||
#endif
|
||||
|
||||
VD vd;
|
||||
BoostVD vd;
|
||||
construct_voronoi(lines.begin(), lines.end(), &vd);
|
||||
|
||||
for (const auto& edge : vd.edges())
|
||||
@@ -1359,7 +1361,7 @@ TEST_CASE("Voronoi offset", "[VoronoiOffset]")
|
||||
|
||||
VD vd;
|
||||
Lines lines = to_lines(poly_with_hole);
|
||||
construct_voronoi(lines.begin(), lines.end(), &vd);
|
||||
vd.construct_voronoi(lines.begin(), lines.end());
|
||||
|
||||
for (const OffsetTest &ot : {
|
||||
OffsetTest { scale_(0.2), 1, 1 },
|
||||
@@ -1425,7 +1427,7 @@ TEST_CASE("Voronoi offset 2", "[VoronoiOffset]")
|
||||
|
||||
VD vd;
|
||||
Lines lines = to_lines(poly);
|
||||
construct_voronoi(lines.begin(), lines.end(), &vd);
|
||||
vd.construct_voronoi(lines.begin(), lines.end());
|
||||
|
||||
for (const OffsetTest &ot : {
|
||||
OffsetTest { scale_(0.2), 2, 2 },
|
||||
@@ -1495,7 +1497,7 @@ TEST_CASE("Voronoi offset 3", "[VoronoiOffset]")
|
||||
|
||||
VD vd;
|
||||
Lines lines = to_lines(poly);
|
||||
construct_voronoi(lines.begin(), lines.end(), &vd);
|
||||
vd.construct_voronoi(lines.begin(), lines.end());
|
||||
|
||||
for (const OffsetTest &ot : {
|
||||
OffsetTest { scale_(0.2), 2, 2 },
|
||||
@@ -1746,7 +1748,7 @@ TEST_CASE("Voronoi offset with edge collapse", "[VoronoiOffset4]")
|
||||
|
||||
VD vd;
|
||||
Lines lines = to_lines(poly);
|
||||
construct_voronoi(lines.begin(), lines.end(), &vd);
|
||||
vd.construct_voronoi(lines.begin(), lines.end());
|
||||
|
||||
for (const OffsetTest &ot : {
|
||||
OffsetTest { scale_(0.2), 2, 2 },
|
||||
@@ -1857,7 +1859,7 @@ TEST_CASE("Voronoi offset 5", "[VoronoiOffset5]")
|
||||
|
||||
VD vd;
|
||||
Lines lines = to_lines(poly);
|
||||
construct_voronoi(lines.begin(), lines.end(), &vd);
|
||||
vd.construct_voronoi(lines.begin(), lines.end());
|
||||
|
||||
for (const OffsetTest &ot : {
|
||||
OffsetTest { scale_(2.8), 1, 1 },
|
||||
@@ -1915,7 +1917,7 @@ TEST_CASE("Voronoi skeleton", "[VoronoiSkeleton]")
|
||||
|
||||
VD vd;
|
||||
Lines lines = to_lines(poly);
|
||||
construct_voronoi(lines.begin(), lines.end(), &vd);
|
||||
vd.construct_voronoi(lines.begin(), lines.end());
|
||||
Slic3r::Voronoi::annotate_inside_outside(vd, lines);
|
||||
Slic3r::Voronoi::annotate_inside_outside(vd, lines);
|
||||
static constexpr double threshold_alpha = M_PI / 12.; // 30 degrees
|
||||
@@ -1966,7 +1968,7 @@ TEST_CASE("Voronoi missing vertex 1", "[VoronoiMissingVertex1]")
|
||||
|
||||
VD vd;
|
||||
Lines lines = to_lines(poly);
|
||||
construct_voronoi(lines.begin(), lines.end(), &vd);
|
||||
vd.construct_voronoi(lines.begin(), lines.end());
|
||||
#ifdef VORONOI_DEBUG_OUT
|
||||
dump_voronoi_to_svg(debug_out_path("voronoi-missing-vertex1-out.svg").c_str(), vd, Points(), lines);
|
||||
#endif
|
||||
@@ -2006,7 +2008,7 @@ TEST_CASE("Voronoi missing vertex 2", "[VoronoiMissingVertex2]")
|
||||
|
||||
VD vd;
|
||||
Lines lines = to_lines(poly);
|
||||
construct_voronoi(lines.begin(), lines.end(), &vd);
|
||||
vd.construct_voronoi(lines.begin(), lines.end());
|
||||
#ifdef VORONOI_DEBUG_OUT
|
||||
dump_voronoi_to_svg(debug_out_path("voronoi-missing-vertex2-out.svg").c_str(), vd, Points(), lines);
|
||||
#endif
|
||||
@@ -2045,7 +2047,7 @@ TEST_CASE("Voronoi missing vertex 3", "[VoronoiMissingVertex3]")
|
||||
// polygons_rotate(poly, PI/180);
|
||||
// polygons_rotate(poly, PI/6);
|
||||
|
||||
VD vd;
|
||||
BoostVD vd;
|
||||
Lines lines = to_lines(poly);
|
||||
construct_voronoi(lines.begin(), lines.end(), &vd);
|
||||
#ifdef VORONOI_DEBUG_OUT
|
||||
@@ -2080,7 +2082,7 @@ TEST_CASE("Duplicate Voronoi vertices", "[Voronoi]")
|
||||
|
||||
VD vd;
|
||||
Lines lines = to_lines(poly);
|
||||
construct_voronoi(lines.begin(), lines.end(), &vd);
|
||||
vd.construct_voronoi(lines.begin(), lines.end());
|
||||
#ifdef VORONOI_DEBUG_OUT
|
||||
dump_voronoi_to_svg(debug_out_path("voronoi-duplicate-vertices-out.svg").c_str(), vd, Points(), lines);
|
||||
#endif
|
||||
@@ -2120,7 +2122,7 @@ TEST_CASE("Intersecting Voronoi edges", "[Voronoi]")
|
||||
|
||||
VD vd;
|
||||
Lines lines = to_lines(poly);
|
||||
construct_voronoi(lines.begin(), lines.end(), &vd);
|
||||
vd.construct_voronoi(lines.begin(), lines.end());
|
||||
#ifdef VORONOI_DEBUG_OUT
|
||||
dump_voronoi_to_svg(debug_out_path("voronoi-intersecting-edges-out.svg").c_str(), vd, Points(), lines);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user