ENH: additional boundBox methods (issue #714)

-  boundBox::nDim() to assess dimensionality

- boundBox::intersect(const plane&) to test if plane intersects the
  bounding box
This commit is contained in:
Mark Olesen
2018-01-29 10:07:44 +01:00
parent 1b9aec2a3d
commit e6c1b394cc
6 changed files with 86 additions and 22 deletions

View File

@ -222,7 +222,7 @@ const Foam::wordList& Foam::searchableBox::regions() const
Foam::tmp<Foam::pointField> Foam::searchableBox::coordinates() const
{
tmp<pointField> tCtrs = tmp<pointField>(new pointField(6));
tmp<pointField> tCtrs(new pointField(6));
pointField& ctrs = tCtrs.ref();
const pointField pts(treeBoundBox::points());

View File

@ -324,7 +324,7 @@ Foam::label Foam::searchableSurfaceCollection::size() const
Foam::tmp<Foam::pointField>
Foam::searchableSurfaceCollection::coordinates() const
{
tmp<pointField> tCtrs = tmp<pointField>(new pointField(size()));
tmp<pointField> tCtrs(new pointField(size()));
pointField& ctrs = tCtrs.ref();
// Append individual coordinates