diff --git a/src/triSurface/triSurface/interfaces/STL/readSTL.C b/src/triSurface/triSurface/interfaces/STL/readSTL.C index d12e78b0371f2cfc4876bf618c7ccaa84115db80..43c9453a524e045805b69c0561a878d819b626a9 100644 --- a/src/triSurface/triSurface/interfaces/STL/readSTL.C +++ b/src/triSurface/triSurface/interfaces/STL/readSTL.C @@ -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; } diff --git a/tutorials/incompressible/porousSimpleFoam/straightDuctImplicit/constant/triSurface/porosity.stl b/tutorials/incompressible/porousSimpleFoam/straightDuctImplicit/constant/triSurface/porosity.stl index 2737bdf92797eef90239374f8a5dd88b052be40c..1d4c5e88ed4025cb4fa99bd59400be345a476453 100644 --- a/tutorials/incompressible/porousSimpleFoam/straightDuctImplicit/constant/triSurface/porosity.stl +++ b/tutorials/incompressible/porousSimpleFoam/straightDuctImplicit/constant/triSurface/porosity.stl @@ -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 diff --git a/tutorials/incompressible/porousSimpleFoam/straightDuctImplicit/constant/triSurface/porosity_inflated.stl b/tutorials/incompressible/porousSimpleFoam/straightDuctImplicit/constant/triSurface/porosity_inflated.stl index 6c7c264eb0efeef7c88e0941088124d9710d21aa..7df4b08619efb3bf83abbccdc5d4d4168b4a65ca 100644 --- a/tutorials/incompressible/porousSimpleFoam/straightDuctImplicit/constant/triSurface/porosity_inflated.stl +++ b/tutorials/incompressible/porousSimpleFoam/straightDuctImplicit/constant/triSurface/porosity_inflated.stl @@ -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