Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
John Apostolakis
VecGeom
Commits
611dfe82
Commit
611dfe82
authored
Aug 18, 2021
by
Andrei Gheata
Committed by
Andrei Gheata
Aug 25, 2021
Browse files
Fixed approaching bbox and removed leftover debug checks.
parent
f51ccdc7
Changes
1
Hide whitespace changes
Inline
Side-by-side
test/shape_tester/ShapeTester.cpp
View file @
611dfe82
...
...
@@ -1054,7 +1054,6 @@ int ShapeTester<ImplT>::TestOutsidePoint()
continue
;
}
if
(
insideOrNot
==
vecgeom
::
EInside
::
kInside
)
{
insideOrNot
=
fVolume
->
Inside
(
p
);
ReportError
(
&
nError
,
point
,
v
,
dist
,
"TO: DistanceToIn(p,v) overshoots"
);
continue
;
}
...
...
@@ -1062,7 +1061,6 @@ int ShapeTester<ImplT>::TestOutsidePoint()
safeDistance
=
fVolume
->
SafetyToIn
(
p
);
// The safety from a boundary should not be bigger than the tolerance
if
(
safeDistance
>
fSolidTolerance
)
{
safeDistance
=
fVolume
->
SafetyToIn
(
p
);
ReportError
(
&
nError
,
p
,
v
,
safeDistance
,
"TO2: SafetyToIn(p) should be zero"
);
continue
;
}
...
...
@@ -1182,7 +1180,10 @@ int ShapeTester<ImplT>::TestOutsidePoint()
Vec_t
v
=
vr
.
Unit
();
Precision
distBB
=
fVolume
->
GetUnplacedVolume
()
->
ApproachSolid
(
point
,
1
/
v
);
Vec_t
invdir
=
Vec_t
(
1.
/
NonZero
(
v
.
x
()),
1.
/
NonZero
(
v
.
y
()),
1.
/
NonZero
(
v
.
z
()));
Precision
distBB
=
fVolume
->
GetUnplacedVolume
()
->
ApproachSolid
(
point
,
invdir
);
// Avoid approaching to the boundary
distBB
=
(
distBB
>
toleranceBB
)
?
distBB
-
toleranceBB
:
0.
;
Vec_t
pointBB
=
point
+
distBB
*
v
;
Precision
distIn
=
fVolume
->
DistanceToIn
(
pointBB
,
v
);
Precision
dist
=
distIn
+
distBB
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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