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);
+