]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
0021208: Performance issue when loading SMESH with an hdf file containing a big mesh
authoreap <eap@opencascade.com>
Thu, 22 Mar 2012 14:10:37 +0000 (14:10 +0000)
committereap <eap@opencascade.com>
Thu, 22 Mar 2012 14:10:37 +0000 (14:10 +0000)
   In GetSourceSubMeshes(), fix getting a main sub-mesh of a not loaded mesh

src/StdMeshers/StdMeshers_ImportSource.cxx

index 5e963a02d96401edf200001bed5df2819f07ccd8..6f1997439db2700148e4c1977027a49321ddb6cd 100644 (file)
@@ -268,8 +268,10 @@ std::vector<SMESH_subMesh*>
 StdMeshers_ImportSource1D::GetSourceSubMeshes(const SMESH_Mesh* srcMesh) const
 {
   if ( !srcMesh->HasShapeToMesh() )
-    return vector<SMESH_subMesh*>(1, srcMesh->GetSubMeshContaining(1));
-
+  {
+    SMESH_Mesh* srcM = const_cast< SMESH_Mesh* >( srcMesh );
+    return vector<SMESH_subMesh*>(1, srcM->GetSubMesh( srcM->GetShapeToMesh()));
+  }
   set<int> shapeIDs;
   const vector<SMESH_Group*>& groups = GetGroups();
   const SMESHDS_Mesh * srcMeshDS = srcMesh->GetMeshDS();