Fix the tests after EigenMesh3D refactor

This commit is contained in:
tamasmeszaros 2020-06-02 17:15:08 +02:00
parent dc725ecbad
commit 10c59b0d00
3 changed files with 8 additions and 2 deletions

View file

@ -7,7 +7,7 @@
// There is an implementation of a hole-aware raycaster that was eventually // There is an implementation of a hole-aware raycaster that was eventually
// not used in production version. It is now hidden under following define // not used in production version. It is now hidden under following define
// for possible future use. // for possible future use.
#define SLIC3R_HOLE_RAYCASTER // #define SLIC3R_HOLE_RAYCASTER
#ifdef SLIC3R_HOLE_RAYCASTER #ifdef SLIC3R_HOLE_RAYCASTER
#include "libslic3r/SLA/Hollowing.hpp" #include "libslic3r/SLA/Hollowing.hpp"

View file

@ -39,7 +39,7 @@ TEST_CASE("Raycaster - find intersections of a line and cylinder")
REQUIRE(std::abs(out[1].first - std::sqrt(72.f)) < 0.001f); REQUIRE(std::abs(out[1].first - std::sqrt(72.f)) < 0.001f);
} }
#ifdef SLIC3R_HOLE_RAYCASTER
// Create a simple scene with a 20mm cube and a big hole in the front wall // Create a simple scene with a 20mm cube and a big hole in the front wall
// with 5mm radius. Then shoot rays from interesting positions and see where // with 5mm radius. Then shoot rays from interesting positions and see where
// they land. // they land.
@ -94,3 +94,4 @@ TEST_CASE("Raycaster with loaded drillholes", "[sla_raycast]")
// Check for support tree correctness // Check for support tree correctness
test_support_model_collision("20mm_cube.obj", {}, hcfg, holes); test_support_model_collision("20mm_cube.obj", {}, hcfg, holes);
} }
#endif

View file

@ -105,8 +105,13 @@ void test_supports(const std::string &obj_filename,
// Create the special index-triangle mesh with spatial indexing which // Create the special index-triangle mesh with spatial indexing which
// is the input of the support point and support mesh generators // is the input of the support point and support mesh generators
sla::EigenMesh3D emesh{mesh}; sla::EigenMesh3D emesh{mesh};
#ifdef SLIC3R_HOLE_RAYCASTER
if (hollowingcfg.enabled) if (hollowingcfg.enabled)
emesh.load_holes(drainholes); emesh.load_holes(drainholes);
#endif
// TODO: do the cgal hole cutting...
// Create the support point generator // Create the support point generator
sla::SupportPointGenerator::Config autogencfg; sla::SupportPointGenerator::Config autogencfg;