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
This commit is contained in:
eap 2012-03-22 14:10:37 +00:00
parent 264238f852
commit f4f14a98e3

View 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();