Go to the documentation of this file.
43 void Foam::OBJstream::writeAndCheck(
const char c)
49 else if (startOfLine_)
87 for (
const char* iter = str; *iter; ++iter)
109 const std::string& str,
116 for (
auto iter = str.cbegin(); iter != str.cend(); ++iter)
118 writeAndCheck(*iter);
126 unsigned backslash = 0;
127 for (
auto iter = str.cbegin(); iter != str.cend(); ++iter)
129 const char c = *iter;
166 write(
"v ") << pt.
x() <<
' ' << pt.
y() <<
' ' << pt.
z() <<
nl;
183 write(
"l ") << nVertices_-1 <<
' ' << nVertices_ <<
nl;
192 write(
"l ") << nVertices_-1 <<
' ' << nVertices_ <<
nl;
206 write(
"l ") << nVertices_-1 <<
' ' << nVertices_ <<
nl;
217 const label start = nVertices_+1;
224 for (
int i = 0; i < 3; i++)
226 write(
' ') << i+start;
228 write(
' ') << start <<
'\n';
233 for (
int i = 0; i < 3; i++)
235 write(
' ') << i+start;
246 const UList<point>&
points,
250 const label start = nVertices_+1;
260 write(
' ') << i+start;
262 write(
' ') << start <<
'\n';
269 write(
' ') << i+start;
279 const UList<face>& faces,
284 SubList<face> allFcs(faces, faces.size());
288 const pointField& localPoints = pp.localPoints();
289 const faceList& localFaces = pp.localFaces();
291 const label start = nVertices_+1;
295 write(localPoints[i]);
303 const edge&
e = edges[edgeI];
305 write(
"l ") <<
e[0]+start <<
' ' <<
e[1]+start <<
nl;
312 const face&
f = localFaces[facei];
327 const UList<edge>& edges,
328 const UList<point>&
points,
337 label objPointId = nVertices_+1;
339 Map<label> markedPoints(2*edges.size());
342 const edge&
e = edges[edgei];
344 if (markedPoints.insert(
e[0], objPointId))
349 if (markedPoints.insert(
e[1], objPointId))
358 const edge&
e = edges[edgei];
361 << markedPoints[
e[0]] <<
' '
362 << markedPoints[
e[1]] <<
nl;
367 const label start = nVertices_+1;
376 const edge&
e = edges[edgei];
379 <<
e[0]+start <<
' ' <<
e[1]+start <<
nl;
389 const treeBoundBox& bb,
393 const label start = nVertices_+1;
407 write(
"l ") <<
e[0]+start <<
' ' <<
e[1]+start <<
nl;
vectorField pointField
pointField is a vectorField.
virtual bool write(const token &tok)
List< edge > edgeList
A List of edges.
A class for handling words, derived from Foam::string.
A class for handling file names.
const edgeList & edges() const
tmp< pointField > points() const
A List obtained as a section of another List.
virtual Ostream & writeQuoted(const std::string &str, const bool quoted=true)
Standard boundBox with extra functionality for use in octree.
An edge is a list of two point labels. The functionality it provides supports the discretisation on a...
static const edgeList edges
virtual Ostream & write(const char c)
os writeQuoted(("# "+outputName+"\n"), false)
A triangle primitive used to calculate face normals and swept volumes.
Generic templated field type.
static const faceList faces
The IOstreamOption is a simple container for options an IOstream can normally have.
const List< face_type > & localFaces() const
const Field< point_type > & localPoints() const
Output to file stream, using an OSstream.
List< face > faceList
A List of faces.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
const dimensionedScalar e
void write(vtk::formatter &fmt, const Type &val, const label n=1)
const dimensionedScalar c
bool ln(const fileName &src, const fileName &dst)
PrimitivePatch< SubList< face >, const pointField & > primitivePatch
A PrimitivePatch with a SubList addressing for the faces, const reference for the point field.
A face is a list of labels corresponding to mesh vertices.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
defineTypeNameAndDebug(combustionModel, 0)
A list of faces which address into the list of points.
OBJstream(const fileName &pathname, IOstreamOption streamOpt=IOstreamOption())