mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-02-05 13:24:18 +05:00
22853: EDF 9924 GEOM: Dimension histogram
- Fix bug with improper range computing when selecting list of shapes
This commit is contained in:
parent
7760eb2714
commit
d63b189331
@ -45,6 +45,7 @@ namespace GEOMUtils
|
|||||||
std::map<int, double> measures;
|
std::map<int, double> measures;
|
||||||
|
|
||||||
std::list<TopoDS_Shape>::const_iterator it;
|
std::list<TopoDS_Shape>::const_iterator it;
|
||||||
|
int shift = 0;
|
||||||
for ( it = shapes.begin(); it != shapes.end(); ++it ) {
|
for ( it = shapes.begin(); it != shapes.end(); ++it ) {
|
||||||
double aMeasure;
|
double aMeasure;
|
||||||
TopTools_IndexedMapOfShape aSubShapesMap;
|
TopTools_IndexedMapOfShape aSubShapesMap;
|
||||||
@ -80,8 +81,9 @@ namespace GEOMUtils
|
|||||||
// get global index of sub-shape
|
// get global index of sub-shape
|
||||||
index = aSubShapesMap.FindIndex( aSubShape );
|
index = aSubShapesMap.FindIndex( aSubShape );
|
||||||
// keep measures to distribute it
|
// keep measures to distribute it
|
||||||
measures[index] = aMeasure;
|
measures[shift+index] = aMeasure;
|
||||||
}
|
}
|
||||||
|
shift += aNbS;
|
||||||
}
|
}
|
||||||
return measures;
|
return measures;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user