std::vector<double> lstCenter = bbGetInputCenter();
- double s = bbGetInputS();
- bool ok=false;
+ double s = bbGetInputS();
+ bool ok = false;
if (bbGetInputTypeIn()==0) // direction
{
if (bbGetInputDirection().size()==3)
{
- ok = !( (bbGetInputDirection()[0]==0) && (bbGetInputDirection()[1]==0) && (bbGetInputDirection()[2]==0) );
+ ok = !( (bbGetInputDirection()[0]==0) && (bbGetInputDirection()[1]==0) && (bbGetInputDirection()[2]==0) );
}
} // if TypeIn 0
bbGetInputMeshManagerModel()->SetMeshMemoryMode( bbGetInputMesh() );
} // if Tool 35 Set memory mode
- if (bbGetInputTool()==40) // Reset
+ if (bbGetInputTool()==32) // Copy and Set
{
- printf("EED Warning! MeshManager_tool Reset Not implemented.\n");
+ bbGetInputMeshManagerModel()->CopySetMeshBase( bbGetInputMesh() );
+ } // if Tool 35 Set memory mode
+
+
+ if (bbGetInputTool()==40) // ResetMeshTemp
+ {
+ printf("EED MeshManager_tool::Process ResetMeshTemp 1\n");
+ bbGetInputMeshManagerModel()->ResetMeshTemp();
+ printf("EED MeshManager_tool::Process ResetMeshTemp 2\n");
} // if Tool 40 Reset
} else {
BBTK_DESCRIPTION("No Description.");
BBTK_CATEGORY("empty");
- BBTK_INPUT(MeshManager_tool,Tool,"(default 0) 0:Nothing 10:Undo 20:ReDo 30:Set 35:Set memory mode 40:Reset",int,"");
+ BBTK_INPUT(MeshManager_tool,Tool,"(default 0) 0:Nothing 10:Undo 20:ReDo 30:Set 32:Copy and Set 35:Set memory mode 40:ResetMeshTemp",int,"");
BBTK_INPUT(MeshManager_tool,Mesh,"Mesh",vtkPolyData*,"");
BBTK_INPUT(MeshManager_tool,MeshManagerModel,"Mesh Manager Model",MeshManagerModel*,"");
{
}
-void MeshManagerModel::SetMeshBase(vtkPolyData* mesh)
+void MeshManagerModel::ResetMeshTemp_()
{
- if (mesh!=NULL)
+ printf("EED MeshManagerModel::Process ResetMeshTemp_ Start\n");
+ if (_meshBase!=NULL)
{
- _meshBase = mesh;
if (_meshTemp!=NULL)
{
_meshTemp->Delete();
} // if
_meshTemp = vtkPolyData::New();
+ printf("EED MeshManagerModel::Process ResetMeshTemp_ 1\n");
_meshTemp->DeepCopy(_meshBase);
+ printf("EED MeshManagerModel::Process ResetMeshTemp_ 2\n");
+ } else {
+ _meshTemp=NULL;
+ }
+ printf("EED MeshManagerModel::Process ResetMeshTemp_ End\n");
+}
+
+void MeshManagerModel::SetMeshBase(vtkPolyData* mesh)
+{
+ if (mesh!=NULL)
+ {
+ _meshBase = mesh;
+ ResetMeshTemp_();
RefreshOutputs();
} // if mesh
}
RefreshOutputs();
}
+void MeshManagerModel::ResetMeshTemp()
+{
+ printf("EED MeshManagerModel::Process ResetMeshTemp 1\n");
+ ResetMeshTemp_();
+ printf("EED MeshManagerModel::Process ResetMeshTemp 2\n");
+ RefreshOutputs();
+ printf("EED MeshManagerModel::Process ResetMeshTemp 3\n");
+}
+
+void MeshManagerModel::CopySetMeshBase(vtkPolyData* mesh)
+{
+ if (mesh!=NULL)
+ {
+ vtkPolyData *newMesh = vtkPolyData::New();
+ newMesh->DeepCopy( mesh );
+ SetMeshBase(newMesh);
+ } // if mesh
+}
+
+
vtkPolyData* MeshManagerModel::GetMeshBase()
{
return _meshBase;
void SetMeshBase(vtkPolyData* mesh);
void SetMeshMemoryMode(vtkPolyData* mesh);
+ void CopySetMeshBase(vtkPolyData* mesh);
+ void ResetMeshTemp();
+ void ResetMeshTemp_();
vtkPolyData* GetMeshBase();
vtkPolyData* GetMeshTemp();
virtual void RefreshOutputs();