Go to the documentation of this file.
29 #include "triSurface.H"
37 IFstream OFFfile(OFFfileName);
42 <<
"Cannot read file " << OFFfileName
51 <<
"OFF file " << OFFfileName
52 <<
" does not start with 'OFF'"
61 IStringStream lineStream(line);
73 IStringStream lineStream(line);
74 lineStream >>
x >>
y >> z;
80 DynamicList<labelledTri> tris(nElems);
82 for (
label faceI = 0; faceI < nElems; faceI++)
86 IStringStream lineStream(line);
101 tris.append(labelledTri(
f[0],
f[1],
f[2], 0));
103 else if (nVerts == 4)
105 tris.append(labelledTri(
f[0],
f[1],
f[2], 0));
106 tris.append(labelledTri(
f[2],
f[3],
f[0], 0));
114 f.triangles(
points, nTri, triFaces);
116 forAll(triFaces, triFaceI)
118 const face&
f = triFaces[triFaceI];
120 tris.append(labelledTri(
f[0],
f[1],
f[2], 0));
vectorField pointField
pointField is a vectorField.
const Field< point > & points() const
Return reference to global points.
#define forAll(list, i)
Loop across all elements in list.
label nEdges() const
Return number of edges in patch.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
triSurface()
Construct null.
label nPoints() const
Return number of points supporting patch faces.
bool readOFF(const fileName &)
errorManipArg< error, int > exit(error &err, const int errNo=1)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
vector point
Point is a vector.
static string getLineNoComment(IFstream &)
Read non-comment line.