// (the one provided in the attribute 'type' of the tag 'input')
// bbSetOutputOut( bbGetInputIn() );
// std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
-
- if (bbGetInputTool()==1) // Undo
- {
- printf("EED Warning! MeshManager_tool Undo Not implemented.\n");
- }
- if (bbGetInputTool()==2) // Redo
- {
- printf("EED Warning! MeshManager_tool Redo Not implemented.\n");
- }
-
- if (bbGetInputTool()==3) // Set
+ if (bbGetInputMeshManagerModel()!=NULL)
{
- bbGetInputMeshManagerModel()->SetMeshBase( bbGetInputMesh() );
- }
+ if (bbGetInputTool()==10) // Undo
+ {
+ bbGetInputMeshManagerModel()->Undo();
+ std::vector<double> outData = bbGetInputMeshManagerModel()->GetReferencePoint();
+ std::vector<double> refNormal = bbGetInputMeshManagerModel()->GetReferenceNormal();
+ outData.insert(outData.end(), refNormal.begin(), refNormal.end());
+ bbSetOutputOut(outData);
+ } // if Tool 10 Undo
+
+ if (bbGetInputTool()==20) // Redo
+ {
+ bbGetInputMeshManagerModel()->Redo();
+ std::vector<double> outData = bbGetInputMeshManagerModel()->GetReferencePoint();
+ std::vector<double> refNormal = bbGetInputMeshManagerModel()->GetReferenceNormal();
+ outData.insert(outData.end(), refNormal.begin(), refNormal.end());
+ bbSetOutputOut(outData);
+ } // if Tool 20 Redo
- if (bbGetInputTool()==4) // Reset
- {
- printf("EED Warning! MeshManager_tool Reset Not implemented.\n");
- }
+ if (bbGetInputTool()==30) // Set
+ {
+ if (bbGetInputMesh()!=NULL){
+ vtkPoints *points = bbGetInputMesh()->GetPoints();
+ if (points!=NULL)
+ {
+ bbGetInputMeshManagerModel()->SetMeshBase( bbGetInputMesh() );
+ } // if points!=NULL
+ } // Mesh!=NULL
+ } // if Tool 30 Set
+
+ if (bbGetInputTool()==35) // Set memory mode
+ {
+ bbGetInputMeshManagerModel()->SetMeshMemoryMode( bbGetInputMesh() );
+ } // if Tool 35 Set memory mode
+ if(bbGetInputTool() == 37) // Save State Memory Mode
+ {
+ if(bbGetInputDoubleParams().size() == 8){
+ std::vector<double> point = {bbGetInputDoubleParams()[0], bbGetInputDoubleParams()[1], bbGetInputDoubleParams()[2]};
+ bbGetInputMeshManagerModel()->SetReferencePoint(point);
+ std::vector<double> normVect = {bbGetInputDoubleParams()[3], bbGetInputDoubleParams()[4], bbGetInputDoubleParams()[5]};
+ bbGetInputMeshManagerModel()->SetReferenceNormal(normVect);
+ bbGetInputMeshManagerModel()->SaveMemoryMode();
+ }
+ }
+ if (bbGetInputTool()==32) // Copy and Set
+ {
+ bbGetInputMeshManagerModel()->CopySetMeshBase( bbGetInputMesh() );
+ } // if Tool 35 Set memory mode
+
+
+ if (bbGetInputTool()==40) // ResetMeshTemp
+ {
+ 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
+
}
//=====
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