From 241dee29b292c6d3591f6f1561fff491a4478e45 Mon Sep 17 00:00:00 2001
From: Mark Olesen <Mark.Olesen@esi-group.com>
Date: Mon, 25 Nov 2019 10:55:05 +0100
Subject: [PATCH] ENH: add transformPoints -time option (issue #1510)

---
 .../transformPoints/transformPoints.C         | 24 +++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/applications/utilities/mesh/manipulation/transformPoints/transformPoints.C b/applications/utilities/mesh/manipulation/transformPoints/transformPoints.C
index e67d5516217..88a72233df0 100644
--- a/applications/utilities/mesh/manipulation/transformPoints/transformPoints.C
+++ b/applications/utilities/mesh/manipulation/transformPoints/transformPoints.C
@@ -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
-- 
GitLab