Salome HOME
Fix compilation error (conflict of OK name between OCCT Plate_Plate.hxx and GEOM...
[modules/geom.git] / src / GEOMUtils / GEOMUtils.hxx
index fe36edd650a343e1f2a6619fcb3880c7a22bf71d..ba6b7d0459d4091d352eb0eb7b292c540ed0d226 100644 (file)
@@ -155,13 +155,6 @@ namespace GEOMUtils
   Standard_EXPORT void AddSimpleShapes (const TopoDS_Shape& theShape,
                                        TopTools_ListOfShape& theList);
 
-  /*!
-   * \brief Build a triangulation on \a theShape if it is absent.
-   * \param theShape The shape to check/build triangulation on.
-   * \retval bool Returns false if the shape has no faces, i.e. impossible to build triangulation.
-   */
-  Standard_EXPORT bool CheckTriangulation (const TopoDS_Shape& theShape);
-
   /*!
    * \brief Return type of shape for explode. In case of compound it will be a type of its first sub shape.
    * \param theShape The shape to get type of.
@@ -348,20 +341,38 @@ namespace GEOMUtils
   Standard_EXPORT TopoDS_Shape ReduceCompound( const TopoDS_Shape& shape );
 
   /*!
-   * \brief Generate triangulation for the shape.
+   * \brief Get default deflection coefficient used for triangulation
+   * \return default deflection value
+   */
+  Standard_EXPORT double DefaultDeflection();
+
+  /*!
+   * \brief Generate triangulation for \a theShape.
    *
-   * \param shape shape being meshed
-   * \param deflection deflection coefficient to be used
-   * \param forced if \c true, causes generation of mesh regardless it is already present in the shape
+   * \param theShape shape to be meshed.
+   * \param theDeflection deflection coefficient to be used.
+   * \param theForced if \c true, causes generation of mesh regardless it is already present in the shape.
+   * \param theAngleDeflection angular deflection coefficient to be used.
+   * \param isRelative if true, \a theDeflection is considered relative to \a theShape maximum axial dimension.
+   * \param doPostCheck if true, check mesh generation result and return corresponding boolean value.
+   * \retval bool Returns false in the following cases:
+   *              1. The shape has neither faces nor edges, i.e. impossible to build triangulation or polygon.
+   *              2. \a theForced is false and \a theShape has no mesh or has incomplete mesh.
+   *              3. \a doPostCheck is true and mesh generation failed or produced an incomplete mesh.
    */
-  Standard_EXPORT void MeshShape( const TopoDS_Shape shape,
-                                  double deflection, bool forced = true );
+  Standard_EXPORT bool MeshShape( const TopoDS_Shape theShape,
+                                  const double theDeflection = DefaultDeflection(),
+                                  const bool theForced = true,
+                                  const double theAngleDeflection = 0.5,
+                                  const bool isRelative = true,
+                                  const bool doPostCheck = false);
 
   /*!
-   * \brief Get default deflection coefficient used for triangulation
-   * \return default deflection value
+   * \brief Build a triangulation on \a theShape if it is absent.
+   * \param theShape The shape to check/build triangulation on.
+   * \retval bool Returns false if the shape has no faces, i.e. impossible to build triangulation.
    */
-  Standard_EXPORT double DefaultDeflection();
+  Standard_EXPORT bool CheckTriangulation (const TopoDS_Shape& theShape);
 
   /**
    * \brief Check if the shape is not a closed wire or edge.