BUG: STL patch names not being passed through

- regression introduced by a719528832

STYLE: add meaningful solid names for some stl files
This commit is contained in:
Mark Olesen
2017-02-03 09:33:22 +00:00
parent de5688e095
commit ec94c078e3
3 changed files with 18 additions and 4 deletions

View File

@ -84,6 +84,20 @@ bool Foam::triSurface::readSTL(const fileName& STLfileName, bool forceBinary)
f.region() = zoneIds[i];
}
// Set patch names (and sizes)
// - there is likely a more efficient means of doing this
if (reader.stlFormat() == fileFormats::STLCore::ASCII)
{
const List<word>& names = reader.names();
patches_.setSize(names.size());
forAll(names, namei)
{
patches_[namei].name() = names[namei];
}
setDefaultPatches();
}
return true;
}

View File

@ -1,4 +1,4 @@
solid ascii
solid porosity
facet normal 0 -1 0
outer loop
vertex 0 0 -0.025
@ -33599,4 +33599,4 @@ solid ascii
vertex 0.1 0.0475 0.025
endloop
endfacet
endsolid
endsolid porosity

View File

@ -1,4 +1,4 @@
solid ascii
solid porosity_inflated
facet normal 0 -1 0
outer loop
vertex 0 -0.005 -0.031
@ -33599,4 +33599,4 @@ solid ascii
vertex 0.1 0.052 0.029
endloop
endfacet
endsolid
endsolid porosity_inflated