]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
Fix for bug NPAL18491(EDF 630 SMESH : group of face appears with one hole in SMESH...
authormzn <mzn@opencascade.com>
Wed, 16 Jan 2008 07:16:09 +0000 (07:16 +0000)
committermzn <mzn@opencascade.com>
Wed, 16 Jan 2008 07:16:09 +0000 (07:16 +0000)
src/DriverMED/DriverMED_R_SMESHDS_Mesh.cxx
src/SMDS/SMDS_MeshGroup.cxx

index 7271a5c86d3f575c190acb73c40ae89a20e54453..e500ed3ade57f9743d8b19250ebc55a6ba48a606 100644 (file)
@@ -795,7 +795,7 @@ void DriverMED_R_SMESHDS_Mesh::GetGroup(SMESHDS_Group* theGroup)
        theGroup->SMDSGroup().Add(element);
       }
       if ( element )
-        theGroup->SetType( element->GetType() );
+        theGroup->SetType( theGroup->SMDSGroup().GetType() );
     }
   }
 }
index adbde5081d5613c7b2afe9fadfcd529120272b9a..e003c9219d25d559edd4428937abfaaaa8785eb7 100644 (file)
@@ -124,8 +124,10 @@ void SMDS_MeshGroup::Add(const SMDS_MeshElement * theElem)
 {
        // the type of the group is determined by the first element added
        if (myElements.empty()) myType = theElem->GetType();
-       else if (theElem->GetType() != myType)
+       else if (theElem->GetType() != myType) {
          MESSAGE("SMDS_MeshGroup::Add : Type Mismatch "<<theElem->GetType()<<"!="<<myType);
+         return;
+       }
        
        myElements.insert(theElem);
 }