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);
};
// 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
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;
}