Salome HOME
Merge from V6_4_BR 05/12/2011
[modules/smesh.git] / src / SMESH_I / SMESH_MeshEditor_i.cxx
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);