Go to the documentation of this file.
33 #include "triSurface.H"
44 IFstream TRIfile(TRIfileName);
49 <<
"Cannot read file " << TRIfileName
53 SLList<STLpoint> STLpoints;
54 SLList<label> STLlabels;
55 HashTable<label, string> STLsolidNames;
69 IStringStream lineStream(line);
78 if (!lineStream)
break;
105 word rawSolidName(lineStream);
107 word solidName(
"patch" + rawSolidName(1, rawSolidName.size()-1));
112 STLsolidNames.find(solidName);
114 if (fnd != STLsolidNames.end())
120 Pout<<
"Mapping triangle colour 0" << rawSolidName
121 <<
" to region " << maxRegion <<
" name " << solidName
124 region = maxRegion++;
125 STLsolidNames.insert(solidName, region);
127 STLlabels.append(region);
136 rawPoints[pointI++] = *iter;
146 operator[](i)[0] = pointI++;
147 operator[](i)[1] = pointI++;
148 operator[](i)[2] = pointI++;
149 operator[](i).region() = *iter;
165 patches_[nameI].name() = names[nameI];
166 patches_[nameI].geometricType() =
"empty";
vectorField pointField
pointField is a vectorField.
#define forAll(list, i)
Loop across all elements in list.
List< string > stringList
A List of strings.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Read a hex label from an input stream.
bool readTRI(const fileName &)
friend class const_iterator
Declare friendship with the const_iterator.
forAllConstIter(PtrDictionary< phaseModel >, mixture.phases(), phase)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
pointField & storedPoints()
Non-const access to global points.
errorManipArg< error, int > exit(error &err, const int errNo=1)
void setSize(const label)
Reset size of List.
friend class const_iterator
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
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.
bool stitchTriangles(const pointField &rawPoints, const scalar tol=SMALL, const bool verbose=false)
Function to stitch the triangles by removing duplicate points.
static string getLineNoComment(IFstream &)
Read non-comment line.