X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=bbtk_creaVtk_PKG%2Fsrc%2FbbcreaVtkMeshManager_tool.cxx;h=546ba7470e3cb129335ecac2011f162cc663e125;hb=cc1075b3a78bdc5339b919450b88178bbf9ff1f7;hp=b175bd4d25b3754d3af712d8f72d62127f0455a5;hpb=be32fd3f21cae7088663d1fcb50c32a62ec078b9;p=creaVtk.git diff --git a/bbtk_creaVtk_PKG/src/bbcreaVtkMeshManager_tool.cxx b/bbtk_creaVtk_PKG/src/bbcreaVtkMeshManager_tool.cxx index b175bd4..546ba74 100644 --- a/bbtk_creaVtk_PKG/src/bbcreaVtkMeshManager_tool.cxx +++ b/bbtk_creaVtk_PKG/src/bbcreaVtkMeshManager_tool.cxx @@ -27,23 +27,22 @@ void MeshManager_tool::Process() // bbSetOutputOut( bbGetInputIn() ); // std::cout << "Output value = " <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"); + bbGetInputMeshManagerModel()->Redo(); + //printf("EED Warning! MeshManager_tool Redo Not implemented.\n"); } // if Tool 20 Redo if (bbGetInputTool()==30) // Set { - printf("EED MeshManager_tool::Process Set\n"); if (bbGetInputMesh()!=NULL){ vtkPoints *points = bbGetInputMesh()->GetPoints(); if (points!=NULL) @@ -52,27 +51,52 @@ void MeshManager_tool::Process() } // if points!=NULL } // Mesh!=NULL } // if Tool 30 Set + + if (bbGetInputTool()==31) // Set/Update PolyData Reference + { + if (bbGetInputMesh()!=NULL){ + vtkPoints *points = bbGetInputMesh()->GetPoints(); + if (points!=NULL) + { + bbGetInputMeshManagerModel()->UpdateMeshReference( bbGetInputMesh() ); + } // if points!=NULL + } // Mesh!=NULL + } // if Tool 30 Set if (bbGetInputTool()==35) // Set memory mode { - printf("EED MeshManager_tool::Process Set memory mode\n"); -// if (bbGetInputMesh()!=NULL){ -// vtkPoints *points = bbGetInputMesh()->GetPoints(); -// if (points!=NULL) -// { - bbGetInputMeshManagerModel()->SetMeshMemoryMode( bbGetInputMesh() ); -// } // if points!=NULL -// } // Mesh!=NULL + bbGetInputMeshManagerModel()->SetMeshMemoryMode( bbGetInputMesh() ); + } // if Tool 35 Set memory mode + + if (bbGetInputTool()==32) // Copy and Set + { + bbGetInputMeshManagerModel()->CopySetMeshBase( bbGetInputMesh() ); } // if Tool 35 Set memory mode - if (bbGetInputTool()==40) // Reset + if (bbGetInputTool()==40) // ResetMeshTemp { - printf("EED Warning! MeshManager_tool Reset Not implemented.\n"); + bbGetInputMeshManagerModel()->ResetMeshTemp(); } // if Tool 40 Reset - - + if(bbGetInputTool() == 50) // Set Array of Meshes + { + if(bbGetInputMeshes().size() > 1) + { + bbGetInputMeshManagerModel()->ReplaceMesh(bbGetInputMeshes()); + } + } + if(bbGetInputTool() == 60) // Select Mesh by Name + { + if(!bbGetInputStringParam().empty()) + { + bbGetInputMeshManagerModel()->SelectMeshByName(bbGetInputStringParam()); + } + } + if(bbGetInputTool() == 70) // Delete Current Mesh + { + bbGetInputMeshManagerModel()->DeleteCurrentMesh(); + } } else { printf("EED Warning! MeshManager_tool : MeshManagerModel not defined. \n"); }// if MeshManagerModel != NULL