Skip to content
Snippets Groups Projects
Commit 8197dd3c authored by mattijs's avatar mattijs
Browse files

ENH: plane : added dictionary writing

parent c05ac806
No related branches found
No related tags found
No related merge requests found
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
...@@ -440,6 +440,19 @@ Foam::point Foam::plane::planePlaneIntersect ...@@ -440,6 +440,19 @@ Foam::point Foam::plane::planePlaneIntersect
} }
void Foam::plane::writeDict(Ostream& os) const
{
os.writeKeyword("planeType") << "pointAndNormal"
<< token::END_STATEMENT << nl;
os << indent << "pointAndNormalDict" << nl
<< indent << token::BEGIN_BLOCK << incrIndent << nl;
os.writeKeyword("basePoint") << basePoint_ << token::END_STATEMENT << nl;
os.writeKeyword("normalVector") << unitVector_ << token::END_STATEMENT
<< nl;
os << decrIndent << indent << token::END_BLOCK << endl;
}
// * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * //
bool Foam::operator==(const plane& a, const plane& b) bool Foam::operator==(const plane& a, const plane& b)
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
...@@ -182,6 +182,9 @@ public: ...@@ -182,6 +182,9 @@ public:
//- Return the cutting point between this plane and two other planes //- Return the cutting point between this plane and two other planes
point planePlaneIntersect(const plane&, const plane&) const; point planePlaneIntersect(const plane&, const plane&) const;
//- Write to dictionary
void writeDict(Ostream&) const;
// friend Operators // friend Operators
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment