Do not write empty patches into STL
This commit is contained in:
parent
8665ef69ce
commit
b849115ecd
2 changed files with 8 additions and 2 deletions
|
@ -65,6 +65,7 @@ class geometricSurfacePatch
|
||||||
//- Index of patch in boundary
|
//- Index of patch in boundary
|
||||||
label index_;
|
label index_;
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
//- Runtime type information
|
//- Runtime type information
|
||||||
|
|
|
@ -44,11 +44,16 @@ void triSurface::writeSTLASCII(Ostream& os) const
|
||||||
surfacePatchList myPatches(calcPatches(faceMap));
|
surfacePatchList myPatches(calcPatches(faceMap));
|
||||||
|
|
||||||
label faceIndex = 0;
|
label faceIndex = 0;
|
||||||
forAll(myPatches, patchI)
|
forAll (myPatches, patchI)
|
||||||
{
|
{
|
||||||
// Print all faces belonging to this region
|
// Print all faces belonging to this region
|
||||||
const surfacePatch& patch = myPatches[patchI];
|
const surfacePatch& patch = myPatches[patchI];
|
||||||
|
|
||||||
|
if (patch.size() == 0)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
os << "solid " << patch.name() << endl;
|
os << "solid " << patch.name() << endl;
|
||||||
|
|
||||||
for
|
for
|
||||||
|
|
Reference in a new issue