Be clearer about minimal distance magic numbers
This commit is contained in:
@@ -112,8 +112,7 @@ TEST_F(FeaturePartCommonTest, testBarelyIntersecting)
|
||||
_common->execute();
|
||||
Part::TopoShape ts = _common->Shape.getValue();
|
||||
double volume = PartTestHelpers::getVolume(ts.getShape());
|
||||
double target =
|
||||
Base::Precision::Confusion() * 3 * 1000; // Reduce precision to 1e04 over 3 dimensions
|
||||
double target = PartTestHelpers::minimalDistance * 3; // 3 dimensions in a Volume
|
||||
Base::BoundBox3d bb = ts.getBoundBox();
|
||||
|
||||
// Assert
|
||||
@@ -123,7 +122,7 @@ TEST_F(FeaturePartCommonTest, testBarelyIntersecting)
|
||||
EXPECT_FLOAT_EQ(volume, target); // Should be approximately 0.00029999999999996696
|
||||
// double check using bounds:
|
||||
EXPECT_DOUBLE_EQ(bb.MinX, 0.0);
|
||||
EXPECT_DOUBLE_EQ(bb.MinY, 1.9999);
|
||||
EXPECT_DOUBLE_EQ(bb.MinY, 2.0 - PartTestHelpers::minimalDistance);
|
||||
EXPECT_DOUBLE_EQ(bb.MinZ, 0.0);
|
||||
EXPECT_DOUBLE_EQ(bb.MaxX, 1.0);
|
||||
EXPECT_DOUBLE_EQ(bb.MaxY, 2.0);
|
||||
|
||||
Reference in New Issue
Block a user