+ const SMDS_MeshNode* inFaceNode=0,
+ bool* check=0) const;
+ /*!
+ * \brief Check and fix node UV on a face
+ * \param force - check even if checks of other nodes on this face passed OK
+ * \param distXYZ - returns result distance and point coordinates
+ * \retval bool - false if UV is bad and could not be fixed
+ */
+ bool CheckNodeUV(const TopoDS_Face& F,
+ const SMDS_MeshNode* n,
+ gp_XY& uv,
+ const double tol,
+ const bool force=false,
+ double distXYZ[4]=0) const;
+ /*!
+ * \brief Check and fix node U on an edge
+ * \param force - check even if checks of other nodes on this edge passed OK
+ * \param distXYZ - returns result distance and point coordinates
+ * \retval bool - false if U is bad and could not be fixed
+ */
+ bool CheckNodeU(const TopoDS_Edge& E,
+ const SMDS_MeshNode* n,
+ double& u,
+ const double tol,
+ const bool force=false,
+ double distXYZ[4]=0) const;
+ /*!
+ * \brief Return middle UV taking in account surface period
+ */
+ static gp_XY GetMiddleUV(const Handle(Geom_Surface)& surface,
+ const gp_XY& uv1,
+ const gp_XY& uv2);
+ /*!
+ * \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);
+