Enable canceling Compute

This commit is contained in:
eap 2013-11-14 14:25:12 +00:00
parent 629f12cf13
commit 66f244f657
2 changed files with 0 additions and 7 deletions

View File

@ -392,8 +392,6 @@ bool SMESH_Gen::Compute(SMESH_Mesh & aMesh,
return ret; return ret;
} }
#ifdef WITH_SMESH_CANCEL_COMPUTE
//============================================================================= //=============================================================================
/*! /*!
* Prepare Compute a mesh * Prepare Compute a mesh
@ -419,7 +417,6 @@ void SMESH_Gen::CancelCompute(SMESH_Mesh & aMesh,
_sm_current->ComputeStateEngine( SMESH_subMesh::COMPUTE_CANCELED ); _sm_current->ComputeStateEngine( SMESH_subMesh::COMPUTE_CANCELED );
} }
} }
#endif
//============================================================================= //=============================================================================
/*! /*!

View File

@ -1732,9 +1732,7 @@ CORBA::Boolean SMESH_Gen_i::Compute( SMESH::SMESH_Mesh_ptr theMesh,
myLocShape = SMESH_Mesh::PseudoShape(); myLocShape = SMESH_Mesh::PseudoShape();
// call implementation compute // call implementation compute
::SMESH_Mesh& myLocMesh = meshServant->GetImpl(); ::SMESH_Mesh& myLocMesh = meshServant->GetImpl();
#ifdef WITH_SMESH_CANCEL_COMPUTE
myGen.PrepareCompute( myLocMesh, myLocShape); myGen.PrepareCompute( myLocMesh, myLocShape);
#endif
bool ok = myGen.Compute( myLocMesh, myLocShape); bool ok = myGen.Compute( myLocMesh, myLocShape);
meshServant->CreateGroupServants(); // algos can create groups (issue 0020918) meshServant->CreateGroupServants(); // algos can create groups (issue 0020918)
myLocMesh.GetMeshDS()->Modified(); myLocMesh.GetMeshDS()->Modified();
@ -1764,7 +1762,6 @@ CORBA::Boolean SMESH_Gen_i::Compute( SMESH::SMESH_Mesh_ptr theMesh,
void SMESH_Gen_i::CancelCompute( SMESH::SMESH_Mesh_ptr theMesh, void SMESH_Gen_i::CancelCompute( SMESH::SMESH_Mesh_ptr theMesh,
GEOM::GEOM_Object_ptr theShapeObject ) GEOM::GEOM_Object_ptr theShapeObject )
{ {
#ifdef WITH_SMESH_CANCEL_COMPUTE
SMESH_Mesh_i* meshServant = dynamic_cast<SMESH_Mesh_i*>( GetServant( theMesh ).in() ); SMESH_Mesh_i* meshServant = dynamic_cast<SMESH_Mesh_i*>( GetServant( theMesh ).in() );
::SMESH_Mesh& myLocMesh = meshServant->GetImpl(); ::SMESH_Mesh& myLocMesh = meshServant->GetImpl();
TopoDS_Shape myLocShape; TopoDS_Shape myLocShape;
@ -1773,7 +1770,6 @@ void SMESH_Gen_i::CancelCompute( SMESH::SMESH_Mesh_ptr theMesh,
else else
myLocShape = SMESH_Mesh::PseudoShape(); myLocShape = SMESH_Mesh::PseudoShape();
myGen.CancelCompute( myLocMesh, myLocShape); myGen.CancelCompute( myLocMesh, myLocShape);
#endif
} }
//============================================================================= //=============================================================================