]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
fix GetSubMesh()
authoreap <eap@opencascade.com>
Thu, 27 Aug 2009 13:58:53 +0000 (13:58 +0000)
committereap <eap@opencascade.com>
Thu, 27 Aug 2009 13:58:53 +0000 (13:58 +0000)
     if ( it.More() )
+    {
       index = _myMeshDS->AddCompoundSubmesh( aSubShape, it.Value().ShapeType() );
+      if ( index > _nbSubShapes ) _nbSubShapes = index; // not to create sm for this group again
+    }
   }

src/SMESH/SMESH_Mesh.cxx

index bba940ee6ccba7383f14c712418b8df6c9d4ab3e..1281522d98a55cb91523e4e0fb1e04a4891a0a06 100644 (file)
@@ -839,7 +839,10 @@ SMESH_subMesh *SMESH_Mesh::GetSubMesh(const TopoDS_Shape & aSubShape)
   if (( !index || index > _nbSubShapes ) && aSubShape.ShapeType() == TopAbs_COMPOUND ) {
     TopoDS_Iterator it( aSubShape );
     if ( it.More() )
+    {
       index = _myMeshDS->AddCompoundSubmesh( aSubShape, it.Value().ShapeType() );
+      if ( index > _nbSubShapes ) _nbSubShapes = index; // not to create sm for this group again
+    }
   }
 //   if ( !index )
 //     return NULL; // neither sub-shape nor a group