ENH: additional methods for OBJstream

- write point fields
- writeLine (takes two points)
- writeFace (takes list of face loop points)
This commit is contained in:
Mark Olesen
2022-07-13 20:16:35 +02:00
parent dea31e9b4a
commit c4d18e97a3
40 changed files with 301 additions and 359 deletions

View File

@ -4979,13 +4979,10 @@ void Foam::distributedTriSurfaceMesh::distribute
/searchableSurface::name() + "_after.obj"
);
Info<< "Writing local bounding box to " << str.name() << endl;
const List<treeBoundBox>& myBbs = procBb_[Pstream::myProcNo()];
for (const treeBoundBox& bb : myBbs)
{
pointField pts(bb.points());
for (const edge& e : treeBoundBox::edges)
for (const treeBoundBox& bb : procBb_[Pstream::myProcNo()])
{
str.write(linePointRef(pts[e[0]], pts[e[1]]));
str.write(bb, true); // lines
}
}
}
@ -5001,11 +4998,7 @@ void Foam::distributedTriSurfaceMesh::distribute
{
for (const treeBoundBox& bb : myBbs)
{
pointField pts(bb.points());
for (const edge& e : treeBoundBox::edges)
{
str.write(linePointRef(pts[e[0]], pts[e[1]]));
}
str.write(bb, true); // lines
}
}
}