Go to the documentation of this file.
26 #include "triSurface.H"
28 #include "primitivePatch.H"
51 if (patch.
size() == 0)
56 os <<
"solid " << patch.
name() <<
endl;
61 patchFaceI < patch.
size();
69 os <<
" facet normal "
70 <<
n.x() <<
' ' <<
n.y() <<
' ' <<
n.z() <<
endl;
71 os <<
" outer loop" <<
endl;
79 << pa.
x() <<
' ' << pa.
y() <<
' ' << pa.
z() <<
endl;
81 << pb.
x() <<
' ' << pb.
y() <<
' ' << pb.
z() <<
endl;
83 << pc.
x() <<
' ' << pc.
y() <<
' ' << pc.
z() <<
endl;
85 <<
" endloop" <<
endl;
87 <<
" endfacet" <<
endl;
90 os <<
"endsolid " << patch.
name() <<
endl;
102 os.write(
reinterpret_cast<char*
>(&nTris),
sizeof(
unsigned int));
Pair< int > faceMap(const label facePi, const face &faceP, const label faceNi, const face &faceN)
label size() const
Return size of this patch in the polyMesh face list.
const Field< point > & points() const
Return reference to global points.
static const int STLheaderSize
The number of bytes in the STL header.
#define forAll(list, i)
Loop across all elements in list.
Ostream & endl(Ostream &os)
Add newline and flush stream.
void writeSTLASCII(Ostream &) const
Write to Ostream in ASCII STL 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.
Pre-declare SubField and related Field type.
void write(ostream &)
Write to istream (binary)
'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 triangle representation for STL files.
const Field< point > & faceNormals() const
Return face normals for patch.
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...
Triangle with additional region number.
void writeSTLBINARY(std::ostream &) const
Write to std::ostream in BINARY STL format.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
const word & name() const
Return name.