Salome HOME
020676: EDF 1212 GEOM: Partition operation creates vertices which causes mesh computa...
authoreap <eap@opencascade.com>
Tue, 23 Mar 2010 08:04:58 +0000 (08:04 +0000)
committereap <eap@opencascade.com>
Tue, 23 Mar 2010 08:04:58 +0000 (08:04 +0000)
commit3a82c6685ba4ebb801901e8330428030a65180cd
tree4a4a1cb1671e746a467907264db115c980642b4a
parent6468f538ecf4930241952aef16768dea8fe09ca5
020676: EDF 1212 GEOM: Partition operation creates vertices which causes mesh computation to fail with netgen
 * Cash GeomAPI_ProjectPointOnSurf's
 * Make applyFunc() public under name applyIn2D()

+   * \brief Define a pointer to wrapper over a function of gp_XY class,
+   *       suitable to pass as xyFunPtr to applyIn2D().
+   *       For exaple gp_XY_FunPtr(Added) defines pointer gp_XY_Added to function
+   *       calling gp_XY::Added(gp_XY), which is to be used like following
+   *       applyIn2D(surf, uv1, uv2, gp_XY_Added)
+   */
+#define gp_XY_FunPtr(meth) \
+  static gp_XY __gpXY_##meth (const gp_XY& uv1, const gp_XY& uv2) { return uv1.meth( uv2 ); } \
+  static xyFunPtr gp_XY_##meth = & __gpXY_##meth

+  /*!
+   * \brief Perform given operation on two 2d points in parameric space of given surface.
+   *        It takes into account period of the surface. Use gp_XY_FunPtr macro
+   *        to easily define pointer to function of gp_XY class.
+   */
+  static gp_XY applyIn2D(const Handle(Geom_Surface)& surface,
+                         const gp_XY&                uv1,
+                         const gp_XY&                uv2,
+                         xyFunPtr                    fun,
+                         const bool                  resultInPeriod=true);
+
src/SMESH/SMESH_MesherHelper.cxx
src/SMESH/SMESH_MesherHelper.hxx