mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: foamToVTK: leave VTK directory intact with faceSet, pointSet
This commit is contained in:
@ -366,6 +366,8 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
word cellSetName;
|
word cellSetName;
|
||||||
|
word faceSetName;
|
||||||
|
word pointSetName;
|
||||||
string vtkName = runTime.caseName();
|
string vtkName = runTime.caseName();
|
||||||
|
|
||||||
if (args.optionReadIfPresent("cellSet", cellSetName))
|
if (args.optionReadIfPresent("cellSet", cellSetName))
|
||||||
@ -382,6 +384,9 @@ int main(int argc, char *argv[])
|
|||||||
vtkName = vtkName.substr(i);
|
vtkName = vtkName.substr(i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
args.optionReadIfPresent("faceSet", faceSetName);
|
||||||
|
args.optionReadIfPresent("pointSet", pointSetName);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
instantList timeDirs = timeSelector::select0(runTime, args);
|
instantList timeDirs = timeSelector::select0(runTime, args);
|
||||||
@ -406,6 +411,8 @@ int main(int argc, char *argv[])
|
|||||||
args.optionFound("time")
|
args.optionFound("time")
|
||||||
|| args.optionFound("latestTime")
|
|| args.optionFound("latestTime")
|
||||||
|| cellSetName.size()
|
|| cellSetName.size()
|
||||||
|
|| faceSetName.size()
|
||||||
|
|| pointSetName.size()
|
||||||
|| regionName != polyMesh::defaultRegion
|
|| regionName != polyMesh::defaultRegion
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
@ -489,10 +496,10 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
|
|
||||||
// If faceSet: write faceSet only (as polydata)
|
// If faceSet: write faceSet only (as polydata)
|
||||||
if (args.optionFound("faceSet"))
|
if (faceSetName.size())
|
||||||
{
|
{
|
||||||
// Load the faceSet
|
// Load the faceSet
|
||||||
faceSet set(mesh, args["faceSet"]);
|
faceSet set(mesh, faceSetName);
|
||||||
|
|
||||||
// Filename as if patch with same name.
|
// Filename as if patch with same name.
|
||||||
mkDir(fvPath/set.name());
|
mkDir(fvPath/set.name());
|
||||||
@ -512,10 +519,10 @@ int main(int argc, char *argv[])
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
// If pointSet: write pointSet only (as polydata)
|
// If pointSet: write pointSet only (as polydata)
|
||||||
if (args.optionFound("pointSet"))
|
if (pointSetName.size())
|
||||||
{
|
{
|
||||||
// Load the pointSet
|
// Load the pointSet
|
||||||
pointSet set(mesh, args["pointSet"]);
|
pointSet set(mesh, pointSetName);
|
||||||
|
|
||||||
// Filename as if patch with same name.
|
// Filename as if patch with same name.
|
||||||
mkDir(fvPath/set.name());
|
mkDir(fvPath/set.name());
|
||||||
|
|||||||
Reference in New Issue
Block a user