mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-24 16:30:34 +05:00
Implement Cancel Compute (begin)
This commit is contained in:
parent
d992d85973
commit
5142df035d
@ -269,6 +269,12 @@ module SMESH
|
||||
in GEOM::GEOM_Object theSubObject )
|
||||
raises ( SALOME::SALOME_Exception );
|
||||
|
||||
/*!
|
||||
* Cancel a computation.
|
||||
*/
|
||||
void CancelCompute( in SMESH_Mesh theMesh,
|
||||
in GEOM::GEOM_Object theSubObject );
|
||||
|
||||
/*!
|
||||
* Return true if hypotheses are defined well
|
||||
*/
|
||||
|
@ -1433,6 +1433,9 @@ CORBA::Boolean SMESH_Gen_i::Compute( SMESH::SMESH_Mesh_ptr theMesh,
|
||||
myLocShape = SMESH_Mesh::PseudoShape();
|
||||
// call implementation compute
|
||||
::SMESH_Mesh& myLocMesh = meshServant->GetImpl();
|
||||
#ifdef WITH_SMESH_CANCEL_COMPUTE
|
||||
myGen.PrepareCompute( myLocMesh, myLocShape);
|
||||
#endif
|
||||
bool ok = myGen.Compute( myLocMesh, myLocShape);
|
||||
meshServant->CreateGroupServants(); // algos can create groups (issue 0020918)
|
||||
myLocMesh.GetMeshDS()->Modified();
|
||||
@ -1451,6 +1454,29 @@ CORBA::Boolean SMESH_Gen_i::Compute( SMESH::SMESH_Mesh_ptr theMesh,
|
||||
return false;
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
* SMESH_Gen_i::CancelCompute
|
||||
*
|
||||
* Cancel Compute mesh on a shape
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
void SMESH_Gen_i::CancelCompute( SMESH::SMESH_Mesh_ptr theMesh,
|
||||
GEOM::GEOM_Object_ptr theShapeObject )
|
||||
{
|
||||
#ifdef WITH_SMESH_CANCEL_COMPUTE
|
||||
SMESH_Mesh_i* meshServant = dynamic_cast<SMESH_Mesh_i*>( GetServant( theMesh ).in() );
|
||||
::SMESH_Mesh& myLocMesh = meshServant->GetImpl();
|
||||
TopoDS_Shape myLocShape;
|
||||
if(theMesh->HasShapeToMesh())
|
||||
myLocShape = GeomObjectToShape( theShapeObject );
|
||||
else
|
||||
myLocShape = SMESH_Mesh::PseudoShape();
|
||||
myGen.CancelCompute( myLocMesh, myLocShape);
|
||||
#endif
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
* SMESH_Gen_i::Precompute
|
||||
|
@ -245,6 +245,11 @@ public:
|
||||
CORBA::Boolean Compute( SMESH::SMESH_Mesh_ptr theMesh,
|
||||
GEOM::GEOM_Object_ptr theShapeObject )
|
||||
throw ( SALOME::SALOME_Exception );
|
||||
|
||||
// Cancel Compute mesh on a shape
|
||||
void CancelCompute( SMESH::SMESH_Mesh_ptr theMesh,
|
||||
GEOM::GEOM_Object_ptr theShapeObject );
|
||||
|
||||
/*!
|
||||
* \brief Return errors of mesh computation
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user