Fixed a raycaster problem with handling duplicate hits from igl

The duplicate hits confused winding number calculations in the raycaster, which in turn returned incorrect hit.
This commit is contained in:
Lukas Matena 2020-01-09 14:06:39 +01:00
parent e9d340c87f
commit f22961edae
2 changed files with 10 additions and 7 deletions

View file

@ -48,11 +48,10 @@ TEST_CASE("Raycaster with loaded drillholes", "[sla_raycast]")
REQUIRE(hit.distance() == Approx(radius));
}
// Shouldn't this hit the inside wall through the hole?
SECTION("Fire from outside, hit the back side of the hole cylinder.") {
s.y() = -1.;
auto hit = emesh.query_ray_hit(s, {0, 1., 0.});
REQUIRE(hit.distance() == Approx(hole_length + 1.f));
REQUIRE(hit.distance() == Approx(boxbb.size().y() - hcfg.min_thickness + 1.));
}
SECTION("Check for support tree correctness") {