.. role:: blue :class: blue MbContourOnSurface Contour on Surface ===================================== .. _MbContourOnSurface_Contour_on_Surface_: .. kernel version: The :blue:`MbContourOnSurface` class is declared in the *cur_contour_on_surface.h* file. A contour on surface MbContourOnSurface is defined by a surface :ref:`MbSurface ` **surface** and a two-dimensional contour :ref:`MbContour ` **contour** in the surface parameter space. The curve also contains some additional data that is not mandatory and is used to speed up the work of the curve methods. A contour on a surface is a composite curve, therefore it may have breaks at the junction points of the segments of the two-dimensional contour. A contour on the surface represents a mapping of a contour from the two-dimensional surface parameter space into three-dimensional space. The two-dimensional contour **contour** may lie outside the domain of the surface parameters. The parameter domain of the contour on the surface coincides with the parameter domain of the two-dimensional contour **contour**. In the :blue:`PointOn`\( double & *t*, :blue:`MbCartPoint3D` & *r* ) method, the radius vector of the curve *r* is described by the vector function .. math:: \mathbf{r}(t) = \mathbf{surface}(\mathbf{point}.x, \mathbf{point}.y), where *point* is a point of the two-dimensional contour that is calculated by the *contour* → :blue:`PointOn`\( *t*, *point* ) method. The *x* and *y* coordinates of the two-dimensional point *point* serve as the *u* and *v* parameters of the surface *surface*\( *u*, *v* ). A contour on the surface is constructed by introducing a dependence of the surface parameters *u* and *v* on a common parameter *t*: *u* = *u*\( *t* ), *v* = *v*\( *t* ). This dependence is defined by the two-dimensional contour *contour*. The derivative of a contour on a surface is computed as a composite function .. math:: \frac{\mathit{dr}(t)}{\mathit{\text{dt}}} = \frac{\partial\mathbf{\text{surface}}(u,v)}{\partial u}\mathbf{\text{derive}}\text{.}{x + \frac{\partial\mathbf{\text{surface}}(u,v)}{\partial v}}\mathbf{\text{derive}}\text{.}y, where **derive** is the derivative of the two-dimensional contour that is calculated by the *contour* → :blue:`FirstDer`\( *t*, *derive* ) method. The derivative of the contour on the surface lies in the tangent plane of the surface constructed at the point under consideration. A contour on the surface is shown in the figure: .. figure:: /MODELER/CURVES/pictures/O.4.22.1.png :width: 12cm :align: center A contour on a surface can be periodic if the two-dimensional contour *contour* is periodic or if the surface **surface** is periodic and the end points of the contour **contour** are shifted by the corresponding period of the surface that is periodic in the first or second parameter **surface**. A periodic contour on a surface is usually used to describe the boundary of this surface. The surface *surface* of a contour on a surface can be any surface except for a surface bounded by curves :ref:`MbCurveBoundedSurface `. If a contour on a surface bounded by curves needs to be constructed, then the base surface *MbCurveBoundedSurface* is used as the surface.