From: vsr Date: Thu, 7 May 2015 10:43:14 +0000 (+0300) Subject: 22853: EDF 9924 GEOM: Dimension histogram X-Git-Tag: V7_7_0a1~29 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=d63b189331780e61927d8ba3b558346f334e579a;p=modules%2Fgeom.git 22853: EDF 9924 GEOM: Dimension histogram - Fix bug with improper range computing when selecting list of shapes --- diff --git a/src/GEOMUtils/GEOMUtils_ShapeStatistics.cxx b/src/GEOMUtils/GEOMUtils_ShapeStatistics.cxx index 81ae5aeba..37b5f6b2c 100644 --- a/src/GEOMUtils/GEOMUtils_ShapeStatistics.cxx +++ b/src/GEOMUtils/GEOMUtils_ShapeStatistics.cxx @@ -45,6 +45,7 @@ namespace GEOMUtils std::map measures; std::list::const_iterator it; + int shift = 0; for ( it = shapes.begin(); it != shapes.end(); ++it ) { double aMeasure; TopTools_IndexedMapOfShape aSubShapesMap; @@ -80,8 +81,9 @@ namespace GEOMUtils // get global index of sub-shape index = aSubShapesMap.FindIndex( aSubShape ); // keep measures to distribute it - measures[index] = aMeasure; + measures[shift+index] = aMeasure; } + shift += aNbS; } return measures; }