]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
0021408: EDf 2006 SMESH: USe of DoubleNodesOnGroupBoundaries on 2D leads to crash
authoreap <eap@opencascade.com>
Tue, 1 Nov 2011 14:07:50 +0000 (14:07 +0000)
committereap <eap@opencascade.com>
Tue, 1 Nov 2011 14:07:50 +0000 (14:07 +0000)
     In DoubleNodesOnGroupBoundaries(), throw in case of not volume group

src/SMESH_I/SMESH_MeshEditor_i.cxx
src/SMESH_I/SMESH_MeshEditor_i.hxx

index 94273a2e07a485b3160ea4c9124cd11fe6b16c6d..bb38829be5b10ca5597978bf1611c9e5f3d6fc37 100644 (file)
@@ -5673,6 +5673,7 @@ CORBA::Boolean SMESH_MeshEditor_i::Make2DMeshFrom3D()
 
 CORBA::Boolean SMESH_MeshEditor_i::DoubleNodesOnGroupBoundaries( const SMESH::ListOfGroups& theDomains,
                                                                  CORBA::Boolean createJointElems )
+  throw (SALOME::SALOME_Exception)
 {
   initData();
 
@@ -5686,8 +5687,10 @@ CORBA::Boolean SMESH_MeshEditor_i::DoubleNodesOnGroupBoundaries( const SMESH::Li
   for ( int i = 0, n = theDomains.length(); i < n; i++ )
   {
     SMESH::SMESH_GroupBase_var aGrp = theDomains[ i ];
-    if ( !CORBA::is_nil( aGrp ) && ( aGrp->GetType() != SMESH::NODE ) )
+    if ( !CORBA::is_nil( aGrp ) /*&& ( aGrp->GetType() != SMESH::NODE )*/ )
     {
+      if ( aGrp->GetType() != SMESH::VOLUME )
+        THROW_SALOME_CORBA_EXCEPTION("Not a volume group", SALOME::BAD_PARAM);
       TIDSortedElemSet domain;
       domain.clear();
       domains.push_back(domain);
index 8400080714220830c35e549df04e54c71c99c49e..4efded98b7d0f0c4efef042876d58bb06f17da18 100644 (file)
@@ -713,7 +713,8 @@ public:
    * @return TRUE if operation has been completed successfully, FALSE otherwise
    */
   CORBA::Boolean DoubleNodesOnGroupBoundaries( const SMESH::ListOfGroups& theDomains,
-                                               CORBA::Boolean createJointElems );
+                                               CORBA::Boolean createJointElems )
+    throw (SALOME::SALOME_Exception);
   /*!
    * \brief Double nodes on some external faces and create flat elements.
    * Flat elements are mainly used by some types of mechanic calculations.