From 25d2b6b904b0da80cab124dfa843fa19c46457c6 Mon Sep 17 00:00:00 2001
From: Christophe Geuzaine <cgeuzaine@ulg.ac.be>
Date: Tue, 3 Feb 2004 22:36:39 +0000
Subject: [PATCH] small changes to copy the time values (instead of relying on
 EndView to just add the time step number)

---
 Plugin/Harmonic2Time.cpp | 5 ++++-
 Plugin/Levelset.cpp      | 5 ++++-
 Plugin/Skin.cpp          | 6 +++++-
 Plugin/Triangulate.cpp   | 6 +++++-
 4 files changed, 18 insertions(+), 4 deletions(-)

diff --git a/Plugin/Harmonic2Time.cpp b/Plugin/Harmonic2Time.cpp
index 1b91bdc8f4..944ccb8f2a 100644
--- a/Plugin/Harmonic2Time.cpp
+++ b/Plugin/Harmonic2Time.cpp
@@ -1,4 +1,4 @@
-// $Id: Harmonic2Time.cpp,v 1.8 2003-11-23 02:56:02 geuzaine Exp $
+// $Id: Harmonic2Time.cpp,v 1.9 2004-02-03 22:36:39 geuzaine Exp $
 //
 // Copyright (C) 1997-2003 C. Geuzaine, J.-F. Remacle
 //
@@ -131,6 +131,9 @@ Post_View *GMSH_Harmonic2TimePlugin::execute(Post_View * v)
   if(MIN(rIndex, iIndex) >= 0 && vv->NbTimeStep >= MAX(rIndex, iIndex)) {
     View = BeginView(1);
     harmonic2time(vv, View, rIndex, iIndex, nbSteps);
+    // create time data
+    // FIXME: todo
+    // finalize
     char name[1024], filename[1024];
     sprintf(name, "h2t-%s", vv->Name);
     sprintf(filename, "h2t-%s", vv->FileName);
diff --git a/Plugin/Levelset.cpp b/Plugin/Levelset.cpp
index 29e8a4951c..3c4c6b9cfe 100644
--- a/Plugin/Levelset.cpp
+++ b/Plugin/Levelset.cpp
@@ -1,4 +1,4 @@
-// $Id: Levelset.cpp,v 1.9 2004-01-25 09:28:28 geuzaine Exp $
+// $Id: Levelset.cpp,v 1.10 2004-02-03 22:36:39 geuzaine Exp $
 //
 // Copyright (C) 1997-2003 C. Geuzaine, J.-F. Remacle
 //
@@ -520,6 +520,9 @@ Post_View *GMSH_LevelsetPlugin::execute(Post_View * v)
   executeList(v, v->TY, v->NbTY, 9, w, w->TY, w->NbTY, 9, 5, 8, exnPyr, out);
 
   for(unsigned int i = 0; i < out.size(); i++) {
+    // create time data
+    // FIXME: todo
+    // finalize
     char name[1024], filename[1024];
     sprintf(name, "cut-%s-%d", v->Name, i);
     sprintf(filename, "cut-%s-%d", v->FileName, i);
diff --git a/Plugin/Skin.cpp b/Plugin/Skin.cpp
index 539871e1da..da096b040f 100644
--- a/Plugin/Skin.cpp
+++ b/Plugin/Skin.cpp
@@ -1,4 +1,4 @@
-// $Id: Skin.cpp,v 1.21 2003-11-24 21:38:40 geuzaine Exp $
+// $Id: Skin.cpp,v 1.22 2004-02-03 22:36:39 geuzaine Exp $
 //
 // Copyright (C) 1997-2003 C. Geuzaine, J.-F. Remacle
 //
@@ -281,6 +281,10 @@ Post_View *GMSH_SkinPlugin::execute(Post_View * v)
     RemoveViewByNumber(view->Num);
   }
   else{
+    // copy time data
+    for(int i = 0; i < List_Nbr(vv->Time); i++)
+      List_Add(view->Time, List_Pointer(vv->Time, i));
+    // finalize
     char name[1024], filename[1024];
     sprintf(name, "skin-%s", vv->Name);
     sprintf(filename, "skin-%s", vv->FileName);
diff --git a/Plugin/Triangulate.cpp b/Plugin/Triangulate.cpp
index 191ad3c0e2..9c25d627af 100644
--- a/Plugin/Triangulate.cpp
+++ b/Plugin/Triangulate.cpp
@@ -1,4 +1,4 @@
-// $Id: Triangulate.cpp,v 1.15 2003-11-23 05:41:37 geuzaine Exp $
+// $Id: Triangulate.cpp,v 1.16 2004-02-03 22:36:39 geuzaine Exp $
 //
 // Copyright (C) 1997-2003 C. Geuzaine, J.-F. Remacle
 //
@@ -220,6 +220,10 @@ Post_View *GMSH_TriangulatePlugin::execute(Post_View * v)
   if(vv->NbSP > 2) {
     View = BeginView(1);
     Triangulate(vv, View);
+    // copy time data
+    for(int i = 0; i < List_Nbr(vv->Time); i++)
+      List_Add(View->Time, List_Pointer(vv->Time, i));
+    // finalize
     char name[1024], filename[1024];
     sprintf(name, "triangulate-%s", vv->Name);
     sprintf(filename, "triangulate-%s", vv->FileName);
-- 
GitLab