Commit 3861d8da authored by Mark Olesen's avatar Mark Olesen
Browse files

ENH: include region counting in triSurface writeStats

parent f7237316
......@@ -1181,14 +1181,15 @@ void Foam::triSurface::writeStats(Ostream& os) const
label nPoints = 0;
boundBox bb(boundBox::invertedBox);
labelHashSet regionsUsed;
forAll(*this, facei)
for (const triSurface::FaceType& f : *this)
{
const triSurface::FaceType& f = operator[](facei);
regionsUsed.insert(f.region());
forAll(f, fp)
{
label pointi = f[fp];
const label pointi = f[fp];
if (pointIsUsed.set(pointi, 1))
{
bb.add(points()[pointi]);
......@@ -1197,8 +1198,9 @@ void Foam::triSurface::writeStats(Ostream& os) const
}
}
os << "Triangles : " << size() << endl
<< "Vertices : " << nPoints << endl
os << "Triangles : " << size()
<< " in " << regionsUsed.size() << " region(s)" << nl
<< "Vertices : " << nPoints << nl
<< "Bounding Box : " << bb << endl;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment