.. role:: code :class: code Two-Dimensional Projection Curve MbProjCurve =========================================== .. _MbProjCurve_Two-Dimensional_Projection_Curve_: .. kernel version: 118065 The :code:`MbProjCurve` class is declared in the *cur_projection_curve.h* file. A two-dimensional projection curve is described by a space curve :ref:`MbCurve3D `\* **spaceCurve**, a surface :ref:`MbSurface `\* **surface** and a two-dimensional curve :ref:`MbCurve `\* **curve**. The curve also has some additional data that is optional and is used to speed up the curve methods. A two-dimensional projection curve represents the projection of the space curve **spaceCurve** onto the surface **surface**, which is approximately described by the two-dimensional curve **curve** within the definition domain of the surface parameters. The definition domains of the parameters of the curves **spaceCurve** and **curve** coincide. The two-dimensional curve **curve** is usually a spline whose control points are obtained by projecting points of the space curve **spaceCurve** onto the surface **surface**. The parametrization of the curve **curve** is consistent with the parametrization of the space curve at the control points. The two-dimensional curve **curve** may lie outside the definition domain of the surface parameters. In the method .. code:: cpp PointOn( double & t, MbCartPoint & r) the radius vector of the curve **r** is described by the vector function .. math:: \mathbf{r}(t) = [u \quad v], where *u*, *v* are the parameters of the projection of the point **spaceCurve**\(*t*) onto the surface **surface**. The :code:`PointOn`\() method corrects the parameter *t* if it is outside the curve domain. The :code:`_PointOn`\() method is used to calculate a point without correcting the parameter. An initial approximation of the parameters *u* and *v* is computed by the method .. code:: cpp curve->PointOn(t, point), *u* = **point**\ .x, *v* = **point**\ .y. Then the parameters *u* and *v* are refined by an iterative method using the equations .. math:: \mathbf{deriveU} \cdot (\mathbf{spaceCurve}(t) - \mathbf{surface}(u,\, v)) = 0, \mathbf{deriveV} \cdot (\mathbf{spaceCurve}(t) - \mathbf{surface}(u,\, v)) = 0, where **deriveU** and **deriveV** are the partial derivatives of the radius vector of the surface, which are calculated by the methods .. code:: cpp surface->_DeriveU(u, v, deriveU) and .. code:: cpp surface->_DeriveV(u, v, deriveV), respectively. A projection curve is shown in the figure: .. figure:: ../../pictures/O.3.16.1.png :width: 15cm :align: center The projection curve is used for an exact description of the projection of a space curve onto a surface.