Salome HOME
Fix a bug that NbShapes() and ShapeInfo() return 2 solids for a box
authoreap <eap@opencascade.com>
Fri, 4 Oct 2013 08:54:58 +0000 (08:54 +0000)
committereap <eap@opencascade.com>
Fri, 4 Oct 2013 08:54:58 +0000 (08:54 +0000)
src/GEOM_SWIG/geomBuilder.py

index c4f9c96736b0d3b32d4e9f6351a8fc2ffdb8c18d..de5589ca51ad616390f7357f0612df4e65c2cae6 100644 (file)
@@ -9609,11 +9609,6 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
             # Example: see GEOM_TestMeasures.py
             listSh = self.SubShapeAllIDs(theShape, theType)
             Nb = len(listSh)
-            t       = EnumToLong(theShape.GetShapeType())
-            theType = EnumToLong(theType)
-            if t == theType:
-                Nb = Nb + 1
-                pass
             return Nb
 
         ## 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
                 listSh = self.SubShapeAllIDs(theShape, self.ShapeType[typeSh])
                 Nb = len(listSh)
-                if EnumToLong(theShape.GetShapeType()) == self.ShapeType[typeSh]:
-                    Nb = Nb + 1
-                    pass
                 aDict[typeSh] = Nb
                 pass
             return aDict