]> SALOME platform Git repositories - modules/geom.git/blobdiff - src/GEOMUtils/GEOMUtils.hxx
Salome HOME
0022764: [EDF] Filtering operators in Group and Explode dialog boxes
[modules/geom.git] / src / GEOMUtils / GEOMUtils.hxx
index 95c0e7c0f0201531a4a10d9912e00fc8fb5913c9..0fd9d22a06f7369d8f69c67f97885a32c04b8c80 100644 (file)
@@ -60,6 +60,28 @@ namespace GEOMUtils
   typedef std::vector<LevelInfo> LevelsList;
   typedef std::map<std::string,std::pair<LevelsList,LevelsList> > TreeModel;
 
+  /*!
+   * \brief Compute numerical functor for the shape.
+   *
+   * Resulting value can be used to sort out shapes according to some parameter.
+   * 
+   * Returns a pair of two values (dist, functor) where
+   * - \a dist is a some value that is computed according to the center of mass of given shape;
+   * - \a functor is a numerical functor value
+   *
+   * The numerical functor is computed according to the shape's topological properties as follows:
+   * - orientation for vertices 
+   * - length for edges and wires
+   * - area for faces and shells
+   * - volume for solids, compounds, compsolids
+   *
+   * If \a isOldSorting parameter is set to \c true, for all cases linear properties of the shape
+   * are used (to support backward compatibility in some methods). By default, this parameter is
+   * set to \c false.
+   */
+  Standard_EXPORT std::pair<double, double> ShapeToDouble (const TopoDS_Shape& theShape,
+                                                           bool isOldSorting = false);
+
   /*!
    * \brief Get Local Coordinate System, corresponding to the given shape.
    *