]> Creatis software - creaVtk.git/blobdiff - bbtk_creaVtk_PKG/src/bbcreaVtkMeshManager_tool.cxx
#3493 MeshManager
[creaVtk.git] / bbtk_creaVtk_PKG / src / bbcreaVtkMeshManager_tool.cxx
index cb12791578fb80198f7e91ada973999e0e5f57e8..bda31e1b44a90818c75af3cb1514f33a543bbc5e 100644 (file)
@@ -27,25 +27,37 @@ void MeshManager_tool::Process()
 //    bbSetOutputOut( bbGetInputIn() );
 //    std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
 
-    if (bbGetInputTool()==1) // Undo
+    if (bbGetInputMeshManagerModel()!=NULL)
     {
-        printf("EED Warning!   MeshManager_tool Undo   Not implemented.\n");
-    }
-    if (bbGetInputTool()==2) // Redo
-    {
-        printf("EED Warning!   MeshManager_tool Redo   Not implemented.\n");
-    }
+        if (bbGetInputTool()==10) // Undo
+        {
+            printf("EED Warning!   MeshManager_tool Undo   Not implemented.\n");
+        } // if Tool 10 Undo
+        
+        if (bbGetInputTool()==20) // Redo
+        {
+            printf("EED Warning!   MeshManager_tool Redo   Not implemented.\n");
+        } // if Tool 20 Redo
 
-    
-    if (bbGetInputTool()==3)  // Set
-    {
-        bbGetInputMeshManagerModel()->SetMeshBase( bbGetInputMesh() );
-    }
+        if (bbGetInputTool()==30)  // Set
+        {
+            printf("EED    MeshManager_tool::Process Set\n");
+            if (bbGetInputMesh()!=NULL){
+                vtkPoints   *points = bbGetInputMesh()->GetPoints();
+                if (points!=NULL)
+                {
+                    bbGetInputMeshManagerModel()->SetMeshBase( bbGetInputMesh() );
+                } // if points!=NULL
+            } // Mesh!=NULL
+        } // if Tool 30 Set
 
-    if (bbGetInputTool()==4) // Reset
-    {
-        printf("EED Warning!   MeshManager_tool Reset   Not implemented.\n");
-    }    
+        if (bbGetInputTool()==40) // Reset
+        {
+            printf("EED Warning!   MeshManager_tool Reset   Not implemented.\n");
+        } // if Tool 40 Reset
+    } else {
+        printf("EED Warning! MeshManager_tool : MeshManagerModel not defined. \n");
+    }// if MeshManagerModel != NULL
 }
 
 //===== 
@@ -59,32 +71,28 @@ void MeshManager_tool::bbUserSetDefaultValues()
    bbSetInputMesh(NULL);
    bbSetInputMeshManagerModel(NULL);
 }
+
 //===== 
 // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
 //===== 
 void MeshManager_tool::bbUserInitializeProcessing()
 {
-
 //  THE INITIALIZATION METHOD BODY :
 //    Here does nothing 
 //    but this is where you should allocate the internal/output pointers 
-//    if any 
-
-  
+//    if any
 }
 //===== 
 // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
 //===== 
 void MeshManager_tool::bbUserFinalizeProcessing()
 {
-
 //  THE FINALIZATION METHOD BODY :
 //    Here does nothing 
 //    but this is where you should desallocate the internal/output pointers 
 //    if any
-  
 }
-}
-// EO namespace bbcreaVtk
+
+// EO namespace bbcreaVtk