Fix a bug that NbShapes() and ShapeInfo() return 2 solids for a box

This commit is contained in:
eap 2013-10-04 08:54:58 +00:00
parent 5256eb5b52
commit f8537beabe

View File

@ -9609,11 +9609,6 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
# Example: see GEOM_TestMeasures.py # Example: see GEOM_TestMeasures.py
listSh = self.SubShapeAllIDs(theShape, theType) listSh = self.SubShapeAllIDs(theShape, theType)
Nb = len(listSh) Nb = len(listSh)
t = EnumToLong(theShape.GetShapeType())
theType = EnumToLong(theType)
if t == theType:
Nb = Nb + 1
pass
return Nb return Nb
## Obtain quantity of shapes of each type in \a theShape. ## Obtain quantity of shapes of each type in \a theShape.
@ -9639,9 +9634,6 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
if typeSh in ( "AUTO", "SHAPE" ): continue if typeSh in ( "AUTO", "SHAPE" ): continue
listSh = self.SubShapeAllIDs(theShape, self.ShapeType[typeSh]) listSh = self.SubShapeAllIDs(theShape, self.ShapeType[typeSh])
Nb = len(listSh) Nb = len(listSh)
if EnumToLong(theShape.GetShapeType()) == self.ShapeType[typeSh]:
Nb = Nb + 1
pass
aDict[typeSh] = Nb aDict[typeSh] = Nb
pass pass
return aDict return aDict