Go to the documentation of this file.
28 #include "triSurface.H"
45 static scalar colourMap[] =
66 os <<
"AC3Db" <<
endl;
70 const word& pName = myPatches[patchI].name();
72 label colourI = patchI % 8;
73 label colourCompI = 3 * colourI;
75 os <<
"MATERIAL \"" << pName <<
"Mat\" rgb "
76 << colourMap[colourCompI] <<
' ' << colourMap[colourCompI+1]
77 <<
' ' << colourMap[colourCompI+2]
78 <<
" amb 0.2 0.2 0.2 emis 0 0 0 spec 0.5 0.5 0.5 shi 10"
83 os <<
"OBJECT world" <<
endl
84 <<
"kids " << myPatches.
size() <<
endl;
95 os <<
"OBJECT poly" <<
endl
96 <<
"name \"" << sp.
name() <<
'"' <<
endl;
106 include[faceI] =
true;
122 os << pt.
x() <<
' ' << pt.
y() <<
' ' << pt.
z() <<
endl;
131 os <<
"SURF 0x20" <<
endl
132 <<
"mat " << patchI <<
endl
133 <<
"refs " <<
f.size() <<
endl;
135 os <<
f[0] <<
" 0 0" <<
endl;
136 os <<
f[1] <<
" 0 0" <<
endl;
137 os <<
f[2] <<
" 0 0" <<
endl;
140 os <<
"kids 0" <<
endl;
Pair< int > faceMap(const label facePi, const face &faceP, const label faceNi, const face &faceN)
A class for handling words, derived from string.
#define forAll(list, i)
Loop across all elements in list.
const Field< PointType > & localPoints() const
Return pointField of points in patch.
Ostream & endl(Ostream &os)
Add newline and flush stream.
triSurface subsetMesh(const boolList &include, labelList &pointMap, labelList &faceMap) const
Return new surface. Returns pointMap, faceMap from.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Triangulated surface description with patch information.
void writeAC(Ostream &) const
Write to Ostream in AC3D format. Always sorted by patch.
Istream and Ostream manipulators taking arguments.
label nPoints() const
Return number of points supporting patch faces.
'Patch' on surface as subset of triSurface.
label size() const
Return the number of elements in the UList.
surfacePatchList calcPatches(labelList &faceMap) const
Sort faces according to region. Returns patch list.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Triangle with additional region number.
const List< Face > & localFaces() const
Return patch faces addressing into local point list.
void size(const label)
Override size to be inconsistent with allocated storage.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
const word & name() const
Return name.