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

ENH: plane : added dictionary writing

parent c05ac806
Branches
Tags
No related merge requests found
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -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 * * * * * * * * * * * * * //
bool Foam::operator==(const plane& a, const plane& b)
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -182,6 +182,9 @@ public:
//- Return the cutting point between this plane and two other planes
point planePlaneIntersect(const plane&, const plane&) const;
//- Write to dictionary
void writeDict(Ostream&) const;
// friend Operators
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment