Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
mantidproject
mantid
Commits
8e6ef404
Commit
8e6ef404
authored
Nov 13, 2015
by
Michael Hart
Browse files
Re #14349 Adjusted an object test that was expecting to fail
parent
0972b4eb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Framework/Geometry/test/ObjectTest.h
View file @
8e6ef404
...
...
@@ -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 fail
s
to find a point in object, as object not on a
principle
//
ax
is
//
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 th
is
//
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
)),
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment