ENH: add transformPoints -time option (issue #1510)

This commit is contained in:
Mark Olesen
2019-11-25 10:55:05 +01:00
committed by Andrew Heather
parent 2e57f329f2
commit 241dee29b2

View File

@ -37,6 +37,10 @@ Description
Usage
Options are:
-time value
Specify the time to search from and apply the transformation
(default is latest)
-translate vector
Translates the points by the given vector before rotations
@ -155,6 +159,13 @@ int main(int argc, char *argv[])
"Note: roll=rotate about x, pitch=rotate about y, yaw=rotate about z"
);
argList::addOption
(
"time",
"time",
"Specify the time to search from and apply the transformation"
" (default is latest)"
);
argList::addOption
(
"translate",
"vector",
@ -248,6 +259,19 @@ int main(int argc, char *argv[])
meshDir = regionName/polyMesh::meshSubDir;
}
if (args.found("time"))
{
if (args.opt("time") == "constant")
{
runTime.setTime(instant(0, "constant"), 0);
}
else
{
scalar timeValue = args.opt<scalar>("time");
runTime.setTime(instant(timeValue), 0);
}
}
pointIOField points
(
IOobject