Commit 8e6ef404 authored by Michael Hart's avatar Michael Hart
Browse files

Re #14349 Adjusted an object test that was expecting to fail

parent 0972b4eb
......@@ -615,12 +615,11 @@ public:
TS_ASSERT_DELTA(pt.Y(), -0.1414213562373, 1e-6);
TS_ASSERT_DELTA(pt.Z(), 0.0, 1e-6);
planes.clear();
// This test fails to find a point in object, as object not on a principle
// axis
// and getBoundingBox does not give a useful result in this case.
// This test used to fail to find a point in object, as object not on a
// principle axis and getBoundingBox did not give a useful result in this
// case. Framework has now been updated to support this automatically.
// Object is unit cube located at +-0.5 in x but centred on z=y=-1.606.. and
// rotated 45deg
// to these two axes
// rotated 45deg to these two axes
planes.push_back("p 1 0 0 -0.5");
planes.push_back("p 1 0 0 0.5");
planes.push_back("p 0 .70710678118 .70710678118 -2");
......@@ -628,7 +627,7 @@ public:
planes.push_back("p 0 -.70710678118 .70710678118 -0.5");
planes.push_back("p 0 -.70710678118 .70710678118 0.5");
Object_sptr F = createCuboid(planes);
TS_ASSERT_EQUALS(F->getPointInObject(pt), 0);
TS_ASSERT_EQUALS(F->getPointInObject(pt), 1); // This now succeeds
// Test use of defineBoundingBox to explictly set the bounding box, when the
// automatic method fails
F->defineBoundingBox(0.5, -1 / (2.0 * sqrt(2.0)), -1.0 / (2.0 * sqrt(2.0)),
......
Markdown is supported
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