Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Development
OpenFOAM-plus
Commits
9aa56e9a
Commit
9aa56e9a
authored
Jan 17, 2019
by
mattijs
Browse files
ENH: pointToPoint: better checking.
parent
83170581
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/meshTools/triSurface/triSurfaceTools/pointToPointPlanarInterpolation.C
View file @
9aa56e9a
...
...
@@ -63,7 +63,7 @@ Foam::pointToPointPlanarInterpolation::calcCoordinateSystem
// Find furthest away point
vector
e1
;
label
index1
=
-
1
;
scalar
maxDist
=
-
GREAT
;
scalar
maxDist
=
ROOTVSMALL
;
for
(
label
i
=
1
;
i
<
points
.
size
();
i
++
)
{
...
...
@@ -77,11 +77,21 @@ Foam::pointToPointPlanarInterpolation::calcCoordinateSystem
maxDist
=
magD
;
}
}
if
(
index1
==
-
1
)
{
FatalErrorInFunction
<<
"Cannot find any point that is different from first point"
<<
p0
<<
". Are all your points coincident?"
<<
exit
(
FatalError
);
}
// Find point that is furthest away from line p0-p1
const
point
&
p1
=
points
[
index1
];
label
index2
=
-
1
;
maxDist
=
-
GREAT
;
maxDist
=
ROOTVSMALL
;
for
(
label
i
=
1
;
i
<
points
.
size
();
i
++
)
{
if
(
i
!=
index1
)
...
...
@@ -101,9 +111,9 @@ Foam::pointToPointPlanarInterpolation::calcCoordinateSystem
if
(
index2
==
-
1
)
{
FatalErrorInFunction
<<
"Cannot find points that
make
valid normal."
<<
nl
<<
"Have so far points "
<<
p0
<<
" and "
<<
p1
<<
"
Need at least three points which are not in a li
ne
.
"
<<
"Cannot find points that
define a plane with a
valid normal."
<<
nl
<<
"Have so far points "
<<
p0
<<
" and "
<<
p1
<<
"
. Are all your points on a single line instead of a pla
ne
?
"
<<
exit
(
FatalError
);
}
...
...
Kutalmış Berçin
@kuti
mentioned in issue
#1107 (closed)
·
Nov 06, 2019
mentioned in issue
#1107 (closed)
mentioned in issue #1107
Toggle commit list
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