Go to the documentation of this file.
33 #include "triSurface.H"
54 <<
"Cannot read file " << TRIfileName
83 if (!lineStream)
break;
110 word rawSolidName(lineStream);
112 word solidName(
"patch" + rawSolidName(1, rawSolidName.size()-1));
117 STLsolidNames.
find(solidName);
119 if (findName != STLsolidNames.end())
125 Pout<<
"Mapping triangle colour 0" << rawSolidName
126 <<
" to region " << maxRegion <<
" name " << solidName
129 region = maxRegion++;
130 STLsolidNames.
insert(solidName, region);
142 iter != STLpoints.
end();
146 rawPoints[i++] = *iter;
155 operator[](i)[0] = pointI++;
156 operator[](i)[1] = pointI++;
157 operator[](i)[2] = pointI++;
158 operator[](i).region() = *iter;
171 patches_[nameI].name() = names[nameI];
172 patches_[nameI].geometricType() =
"empty";
A class for handling words, derived from string.
void append(const T &a)
Add at tail of list.
A class for handling file names.
List< Key > toc() const
Return the table of contents.
Non-intrusive singly-linked list.
#define forAll(list, i)
Loop across all elements in list.
An STL-conforming const_iterator.
bool insert(const Key &, const T &newElmt)
Insert a new hashedEntry.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Read a hex label from an input stream.
bool readTRI(const fileName &)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Pre-declare SubField and related Field type.
Input from memory buffer stream.
iterator find(const Key &)
Find and return an iterator set at the hashedEntry.
errorManipArg< error, int > exit(error &err, const int errNo=1)
An STL-conforming hash table.
void setSize(const label)
Reset size of List.
bool readScalar(const char *buf, doubleScalar &s)
Read whole of buf as a scalar. Return true if succesful.
prefixOSstream Pout(cout, "Pout")
geometricSurfacePatchList patches_
Patch information (face ordering nFaces/startFace only used.
A vertex point representation for STL files.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
bool stitchTriangles(const pointField &rawPoints, const scalar tol=SMALL, const bool verbose=false)
Function to stitch the triangles by removing duplicate points.
#define FatalErrorIn(functionName)
Report an error message using Foam::FatalError.
void size(const label)
Override size to be inconsistent with allocated storage.
bool good() const
Return true if next operation might succeed.
static string getLineNoComment(IFstream &)
Read non-comment line.
A class representing the concept of 0 used to avoid unnecessary manipulations for objects that are kn...