print Descr
\endcode
+<br><h2>NbShapes and ShapeInfo</h2>
+
+\code
+import geompy
+
+# create a box
+box = geompy.MakeBoxDXDYDZ(100,30,100)
+nbSolids = geompy.NbShapes(box, geompy.ShapeType["SOLID"])
+print "\nBox 100x30x100 quantity of solids:", nbSolids
+boxInfo = geompy.ShapeInfo(box)
+print "\nBox 100x30x100 shapes:"
+print boxInfo
+\endcode
+
<br><h2>Check Shape</h2>
\code
print "\nBox 10x30x70 description:"
print Descr
+ ####### NbShapes #######
+
+ NbSolids = geompy.NbShapes(box, geompy.ShapeType["SOLID"])
+ print "\nBox 10x30x70 quantity of solids:", NbSolids
+
+ ####### ShapeInfo #######
+
+ BoxInfo = geompy.ShapeInfo(box)
+ print "\nBox 10x30x70 shapes:"
+ print BoxInfo
+
####### BasicProperties #######
Props = geompy.BasicProperties(box)
RaiseIfFailed("WhatIs", self.MeasuOp)
return aDescr
+ ## Obtain quantity of shapes of the given type in \a theShape.
+ # If \a theShape is of type \a theType, it is also counted.
+ # @param theShape Shape to be described.
+ # @return Quantity of shapes of type \a theType in \a theShape.
+ #
+ # @ref tui_measurement_tools_page "Example"
+ def NbShapes (self, theShape, theType):
+ # Example: see GEOM_TestMeasures.py
+ listSh = self.SubShapeAllIDs(theShape, theType)
+ Nb = len(listSh)
+ if theShape.GetShapeType()._v == theType:
+ Nb = Nb + 1
+ pass
+ return Nb
+
+ ## Obtain quantity of shapes of each type in \a theShape.
+ # The \a theShape is also counted.
+ # @param theShape Shape to be described.
+ # @return Dictionary of shape types with bound quantities of shapes.
+ #
+ # @ref tui_measurement_tools_page "Example"
+ def ShapeInfo (self, theShape):
+ # Example: see GEOM_TestMeasures.py
+ aDict = {}
+ for typeSh in ShapeType:
+ if typeSh != "AUTO" and typeSh != "SHAPE":
+ listSh = self.SubShapeAllIDs(theShape, ShapeType[typeSh])
+ Nb = len(listSh)
+ if theShape.GetShapeType()._v == ShapeType[typeSh]:
+ Nb = Nb + 1
+ pass
+ aDict[typeSh] = Nb
+ pass
+ pass
+ return aDict
+
## Get a point, situated at the centre of mass of theShape.
# @param theShape Shape to define centre of mass of.
# @return New GEOM_Object, containing the created point.