mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-11-11 16:19:16 +05:00
[bos #40035][EDF] Handle Salome Exception in interface to retun meaninfull error message when the shrink geometry does not match the topology of the original geometry.
This commit is contained in:
parent
9340c7602a
commit
0d03310b89
@ -1270,15 +1270,15 @@ module StdMeshers
|
||||
void SetTotalThickness(in double thickness) raises (SALOME::SALOME_Exception);
|
||||
void SetNumberLayers(in short numberOfLayers ) raises (SALOME::SALOME_Exception);
|
||||
void SetStretchFactor(in double strechFactor ) raises (SALOME::SALOME_Exception);
|
||||
void SetMethod( in VLExtrusionMethod how );
|
||||
void SetGroupName(in string name);
|
||||
void SetMethod( in VLExtrusionMethod how ) raises (SALOME::SALOME_Exception);
|
||||
void SetGroupName(in string name) raises (SALOME::SALOME_Exception);
|
||||
|
||||
GEOM::GEOM_Object GetShrinkGeometry( in SMESH::SMESH_Mesh finalMesh, in GEOM::GEOM_Object theObject );
|
||||
GEOM::GEOM_Object GetShrinkGeometry( in SMESH::SMESH_Mesh finalMesh, in GEOM::GEOM_Object theObject ) raises (SALOME::SALOME_Exception);
|
||||
|
||||
/*!
|
||||
* Build the prismatic layer from the shrink mesh
|
||||
*/
|
||||
boolean AddLayers( in SMESH::SMESH_Mesh sourceMesh, in SMESH::SMESH_Mesh finalMesh, in GEOM::GEOM_Object theObject );
|
||||
boolean AddLayers( in SMESH::SMESH_Mesh sourceMesh, in SMESH::SMESH_Mesh finalMesh, in GEOM::GEOM_Object theObject ) raises (SALOME::SALOME_Exception);
|
||||
|
||||
};
|
||||
|
||||
|
@ -1121,7 +1121,7 @@ bool StdMeshers_Cartesian_VL::ViscousBuilder::MakeViscousLayers( SMESH_Mesh &
|
||||
|
||||
// Validate map of shrink+joint geometry elements
|
||||
if ( !CheckGeometryMaps(offsetMesh, theShape ) && !isMainShape2D )
|
||||
throw SALOME_Exception("All elements from the shrink geometry were not match to the original geometry\n");
|
||||
throw SALOME_Exception("The shrink geometry does not match or respect the original topology.The viscous layer can't be build");
|
||||
|
||||
|
||||
initMDS->ClearMesh(); // avoid mesh superposition on multiple calls of addLayers
|
||||
|
@ -188,8 +188,16 @@ CORBA::Boolean StdMeshers_ViscousLayerBuilder_i::AddLayers( SMESH::SMESH_Mesh_pt
|
||||
TopoDS_Shape theShape = StdMeshers_ObjRefUlils::GeomObjectToShape( theShapeObject );
|
||||
SMESH_Mesh_i* shrinkMesh_i = SMESH::DownCast< SMESH_Mesh_i* >( shrinkMesh );
|
||||
SMESH_Mesh_i* theFinalMesh_i = SMESH::DownCast< SMESH_Mesh_i* >( finalMesh );
|
||||
|
||||
bool success = GetImpl()->AddLayers( shrinkMesh_i->GetImpl(), theFinalMesh_i->GetImpl(), theShape );
|
||||
bool success = false;
|
||||
|
||||
try
|
||||
{
|
||||
success = GetImpl()->AddLayers( shrinkMesh_i->GetImpl(), theFinalMesh_i->GetImpl(), theShape );
|
||||
}
|
||||
catch ( std::exception& exc )
|
||||
{
|
||||
THROW_SALOME_CORBA_EXCEPTION( exc.what(), SALOME::INTERNAL_ERROR );
|
||||
}
|
||||
|
||||
return success;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user