mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: test for side of plane a point is on
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -439,6 +439,14 @@ Foam::point Foam::plane::planePlaneIntersect
|
||||
}
|
||||
|
||||
|
||||
Foam::plane::side Foam::plane::sideOfPlane(const point& p) const
|
||||
{
|
||||
const scalar angle((p - basePoint_) & unitVector_);
|
||||
|
||||
return (angle < 0 ? FLIP : NORMAL);
|
||||
}
|
||||
|
||||
|
||||
void Foam::plane::writeDict(Ostream& os) const
|
||||
{
|
||||
os.writeKeyword("planeType") << "pointAndNormal"
|
||||
|
||||
Reference in New Issue
Block a user