36 bool Foam::triSurface::readVTK(
const fileName& fName)
39 fileFormats::VTKsurfaceFormat<triFace> surf(fName);
41 List<labelledTri> tris(surf.faces().size());
45 tris[i] = labelledTri(f[0], f[1], f[2], 0);
49 const List<surfZone>& surfZones = surf.surfZones();
55 patches.setSize(surfZones.size());
58 const surfZone& zone = surfZones[zoneI];
62 word regionName = zone.name();
63 if (regionName != (
string(
"zone") +
name(zoneI)))
65 regionName = string(
"patch") +
name(zoneI);
68 patches[zoneI] = geometricSurfacePatch
72 ? zone.geometricType()
80 for (
label i = zone.start(); i < zone.start()+zone.size(); i++)
82 tris[i].region() = zoneI;
89 patches[0] = geometricSurfacePatch(
"empty",
"patch0", 0);
#define forAll(list, i)
Loop across all elements in list.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
List< geometricSurfacePatch > geometricSurfacePatchList
static const word null
An empty word.
word name(const complex &)
Return a string representation of a complex.