From f4f14a98e3d222a333b9f1b8cbb1a2a29824bc2b Mon Sep 17 00:00:00 2001 From: eap Date: Thu, 22 Mar 2012 14:10:37 +0000 Subject: [PATCH] 0021208: Performance issue when loading SMESH with an hdf file containing a big mesh In GetSourceSubMeshes(), fix getting a main sub-mesh of a not loaded mesh --- src/StdMeshers/StdMeshers_ImportSource.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/StdMeshers/StdMeshers_ImportSource.cxx b/src/StdMeshers/StdMeshers_ImportSource.cxx index 5e963a02d..6f1997439 100644 --- a/src/StdMeshers/StdMeshers_ImportSource.cxx +++ b/src/StdMeshers/StdMeshers_ImportSource.cxx @@ -268,8 +268,10 @@ std::vector StdMeshers_ImportSource1D::GetSourceSubMeshes(const SMESH_Mesh* srcMesh) const { if ( !srcMesh->HasShapeToMesh() ) - return vector(1, srcMesh->GetSubMeshContaining(1)); - + { + SMESH_Mesh* srcM = const_cast< SMESH_Mesh* >( srcMesh ); + return vector(1, srcM->GetSubMesh( srcM->GetShapeToMesh())); + } set shapeIDs; const vector& groups = GetGroups(); const SMESHDS_Mesh * srcMeshDS = srcMesh->GetMeshDS(); -- 2.39.2