Commit 3bd6fe87 authored by Andrei Gheata's avatar Andrei Gheata Committed by Andrei Gheata
Browse files

Tolerance-related fixes for Tet to pass the ShapeTester.

parent 5d8a0c4e
......@@ -144,7 +144,7 @@ struct TetImplementation {
}
vecCore::MaskedAssign(distance,
distance >= distanceOut || distanceOut <= kHalfTolerance || absSafe <= kHalfTolerance,
distance >= distanceOut || distanceOut <= kHalfTolerance || absSafe <= -kHalfTolerance,
Real_v(kInfLength));
}
......
......@@ -1270,7 +1270,7 @@ int ShapeTester<ImplT>::TestAccuracyDistanceToIn(Precision dist)
distOut = CallDistanceToOut(fVolume, point, vec, normal, convex);
// Test for consistency for fPoints situated Inside
pointIn = pointSurf + vec * 1000. * kTolerance;
pointIn = pointSurf + vec * 1000. * tolerance;
if (fVolume->Inside(pointIn) == vecgeom::EInside::kInside) {
Precision distOut1 = CallDistanceToOut(fVolume, pointIn, vec, normal, convex);
Inside_t surfaceP = fVolume->Inside(pointIn + distOut1 * vec);
......
......@@ -38,6 +38,7 @@ int runTester(ImplT const *shape, int npoints, bool debug, bool stat)
tester.setStat(stat);
tester.SetMaxPoints(npoints);
tester.SetTestBoundaryErrors(true);
tester.SetSolidTolerance(0.5 * vecgeom::kTolerance);
int errCode = tester.Run(shape);
std::cout << "Final Error count for Shape *** " << shape->GetName() << "*** = " << errCode << "\n";
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment