X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FSMESHUtils%2FSMESH_MeshAlgos.cxx;h=9f0c88e20e9c849f9e1efe4dc7c1c24ea94853f7;hp=1dd214216b84f91201d3ce8bb3452e1e52abf762;hb=refs%2Ftags%2FV9_7_0a1;hpb=aae0e72c350c31c43d151132f0c7e302a6b79ad2 diff --git a/src/SMESHUtils/SMESH_MeshAlgos.cxx b/src/SMESHUtils/SMESH_MeshAlgos.cxx index 1dd214216..9f0c88e20 100644 --- a/src/SMESHUtils/SMESH_MeshAlgos.cxx +++ b/src/SMESHUtils/SMESH_MeshAlgos.cxx @@ -281,7 +281,7 @@ namespace // Utils used in SMESH_ElementSearcherImpl::FindElementsByPoint() double tolerance) :SMESH_Octree( new LimitAndPool() ) { - int nbElems = mesh.GetMeshInfo().NbElements( elemType ); + smIdType nbElems = mesh.GetMeshInfo().NbElements( elemType ); _elements.reserve( nbElems ); TElementBoxPool& elBoPool = getLimitAndPool()->_elBoPool; @@ -1984,7 +1984,11 @@ SMESH_MeshAlgos::FindSharpEdges( SMDS_Mesh* theMesh, typedef std::pair< bool, const SMDS_MeshNode* > TIsSharpAndMedium; typedef NCollection_DataMap< SMESH_TLink, TIsSharpAndMedium, SMESH_TLink > TLinkSharpMap; - TLinkSharpMap linkIsSharp( theMesh->NbFaces() ); + TLinkSharpMap linkIsSharp; + Standard_Integer nbBuckets = FromSmIdType( theMesh->NbFaces() ); + if ( nbBuckets > 0 ) + linkIsSharp.ReSize( nbBuckets ); + TIsSharpAndMedium sharpMedium( true, 0 ); bool & isSharp = sharpMedium.first; const SMDS_MeshNode* & nMedium = sharpMedium.second; @@ -2091,7 +2095,10 @@ SMESH_MeshAlgos::SeparateFacesByEdges( SMDS_Mesh* theMesh, const std::vector< Ed typedef std::vector< const SMDS_MeshElement* > TFaceVec; typedef NCollection_DataMap< SMESH_TLink, TFaceVec, SMESH_TLink > TFacesByLinks; - TFacesByLinks facesByLink( theMesh->NbFaces() ); + TFacesByLinks facesByLink; + Standard_Integer nbBuckets = FromSmIdType( theMesh->NbFaces() ); + if ( nbBuckets > 0 ) + facesByLink.ReSize( nbBuckets ); std::vector< const SMDS_MeshNode* > faceNodes; for ( SMDS_FaceIteratorPtr faceIt = theMesh->facesIterator(); faceIt->more(); )