From d63b189331780e61927d8ba3b558346f334e579a Mon Sep 17 00:00:00 2001 From: vsr Date: Thu, 7 May 2015 13:43:14 +0300 Subject: [PATCH] 22853: EDF 9924 GEOM: Dimension histogram - Fix bug with improper range computing when selecting list of shapes --- src/GEOMUtils/GEOMUtils_ShapeStatistics.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; } -- 2.39.2