Go to the documentation of this file.
42 void Foam::OBJstream::writeAndCheck(
const char c)
48 else if (startOfLine_)
88 for (
const char* iter = str; *iter; ++iter)
98 return writeQuoted(str,
false);
104 return writeQuoted(str,
true);
110 const std::string& str,
117 for (
auto iter = str.cbegin(); iter != str.cend(); ++iter)
119 writeAndCheck(*iter);
127 unsigned backslash = 0;
128 for (
auto iter = str.cbegin(); iter != str.cend(); ++iter)
130 const char c = *iter;
167 write(
"v ") << pt.
x() <<
' ' << pt.
y() <<
' ' << pt.
z() <<
nl;
184 write(
"l ") << nVertices_-1 <<
' ' << nVertices_ <<
nl;
193 write(
"l ") << nVertices_-1 <<
' ' << nVertices_ <<
nl;
207 write(
"l ") << nVertices_-1 <<
' ' << nVertices_ <<
nl;
225 for (
int i = 0; i < 3; i++)
234 for (
int i = 0; i < 3; i++)
289 const pointField& localPoints = pp.localPoints();
290 const faceList& localFaces = pp.localFaces();
296 write(localPoints[i]);
304 const edge&
e = edges[edgeI];
313 const face&
f = localFaces[facei];
338 label objPointId = nVertices_+1;
343 const edge&
e = edges[edgei];
345 if (markedPoints.insert(
e[0], objPointId))
350 if (markedPoints.insert(
e[1], objPointId))
359 const edge&
e = edges[edgei];
362 << markedPoints[
e[0]] <<
' '
363 << markedPoints[
e[1]] <<
nl;
377 const edge&
e = edges[edgei];
const Cmpt & x() const
Access to the vector x component.
virtual bool write(const token &tok)
Write token to stream or otherwise handle it.
A class for handling words, derived from Foam::string.
A class for handling file names.
tmp< pointField > points() const
Vertex coordinates. In octant coding.
A List obtained as a section of another List.
virtual Ostream & writeQuoted(const std::string &str, const bool quoted=true)
Write std::string surrounded by quotes.
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...
End string with double quote.
static const edgeList edges
Edge to point addressing.
virtual Ostream & write(const char c)
Write character.
const Cmpt & z() const
Access to the vector z component.
#define forAll(list, i)
Loop across all elements in list.
A triangle primitive used to calculate face normals and swept volumes.
word format(conversionProperties.get< word >("format"))
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Representation of a major/minor version number.
static const faceList faces
Face to point addressing.
OBJstream(const fileName &pathname, streamFormat format=ASCII, versionNumber version=currentVersion, compressionType compression=UNCOMPRESSED)
Construct from pathname.
streamFormat
Data format (ascii | binary)
const std::string version
OpenFOAM version (name or stringified number) as a std::string.
Output to file stream, using an OSstream.
const Cmpt & y() const
Access to the vector y component.
label ListType::const_reference const label start
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
Elementary charge.
void write(vtk::formatter &fmt, const Type &val, const label n=1)
Component-wise write of a value (N times)
const dimensionedScalar c
Speed of light in a vacuum.
void size(const label n) noexcept
Override size to be inconsistent with allocated storage.
compressionType
Compression treatment (UNCOMPRESSED | COMPRESSED)
bool ln(const fileName &src, const fileName &dst)
Create a softlink. dst should not exist. Returns true if successful.
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)
Begin string with double quote.
A list of faces which address into the list of points.