]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
22853: EDF 9924 GEOM: Dimension histogram
authorvsr <vsr@opencascade.com>
Thu, 7 May 2015 10:43:14 +0000 (13:43 +0300)
committervsr <vsr@opencascade.com>
Thu, 7 May 2015 10:43:14 +0000 (13:43 +0300)
- Fix bug with improper range computing when selecting list of shapes

src/GEOMUtils/GEOMUtils_ShapeStatistics.cxx

index 81ae5aeba76f91504d78b72799d8087262181c2e..37b5f6b2cec08d6729239e5f97555d7cb05464bd 100644 (file)
@@ -45,6 +45,7 @@ namespace GEOMUtils
   std::map<int, double> measures;
     
   std::list<TopoDS_Shape>::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;
 }