diff --git a/src/StdMeshers/StdMeshers_Hexa_3D.cxx b/src/StdMeshers/StdMeshers_Hexa_3D.cxx index 4138a37d4..de259316b 100644 --- a/src/StdMeshers/StdMeshers_Hexa_3D.cxx +++ b/src/StdMeshers/StdMeshers_Hexa_3D.cxx @@ -424,7 +424,9 @@ bool StdMeshers_Hexa_3D::Compute(SMESH_Mesh & aMesh, } } // check if the loaded grid corresponds to nb of quadrangles - const int nbQuads = meshDS->MeshElements( F )->NbElements(); + const SMESHDS_SubMesh* faceSubMesh = + proxymesh ? proxymesh->GetSubMesh( F ) : meshDS->MeshElements( F ); + const int nbQuads = faceSubMesh->NbElements(); const int nbHor = aCubeSide[i]._u2nodesMap.size() - 1; const int nbVer = aCubeSide[i]._u2nodesMap.begin()->second.size() - 1; if ( nbQuads != nbHor * nbVer )