.. role:: blue :class: blue MbTorusSurface Toroidal Surface ================================ .. _MbTorusSurface_Toroidal_Surface_: .. версия ядра: 1180ХХ The :blue:`MbTorusSurface` class is declared in the *surf\_torus\_surface.h* file. The :blue:`MbTorusSurface` toroidal surface belongs to the group of elementary surfaces :blue:`MbElementarySurface`. The toroidal surface is described by the major radius *majorRadius* and the tube radius *minorRadius*, defined in the local coordinate system :ref:`MbPlacement3D ` **position**. The first surface parameter is measured along the arc from the vector **position.axisX** in the direction of the vector **position.axisY**. The first surface parameter *u* takes values on the interval: *umin* ≤ *u* ≤ *umax*. The values *u* = 0 and *u* = 2π correspond to a point on the XZ plane. The surface can be periodic with respect to the first parameter. For a periodic surface, *umax* - *umin* = 2π; for a non-periodic surface, *umax* - *umin* < 2π. The second surface parameter is measured along the arc from the XY plane of the local coordinate system of the surface in the direction of the vector **position.axisZ**. The second surface parameter *v* takes values on the interval: *vmin* ≤ *v* ≤ *vmax*. The values *v* = 0 and *v* = 2π correspond to a point on the XY plane of the local coordinate system of the surface. The surface can be periodic with respect to the second parameter when *majorRadius* > *minorRadius*. For a periodic surface, *vmax* - *vmin* = 2π; for a non-periodic surface, *vmax* - *vmin* < 2π. In the :blue:`PointOn`\( double *u*, double *v*, :ref:`MbCartPoint3D ` & **s** ) method, the position vector of the surface **s** is described by the vector function .. math:: :nowrap: \begin{equation} \mathbf{s}(u, v) = \mathbf{position.origin} + \left( \mathit{majorRadius} + \mathit{minorRadius} \cdot \cos(v) \right) \left( \cos(u)\, \mathbf{position.axisX} + \sin(u)\, \mathbf{position.axisY} \right) + \\ \mathit{minorRadius} \cdot \sin(v)\, \mathbf{position.axisZ} \end{equation} Figure shows the toroidal surface: .. figure:: /MODELER/SURFACES/pictures/O.5.6.1.png :width: 15cm :align: center The tube radius must be greater than zero: *minorRadius* > 0. The major radius must be no less than the tube radius taken with the opposite sign: *majorRadius* > -*minorRadius*. If *majorRadius* < *minorRadius*, the surface has a pole at the parameter values *v* = arccos(*majorRadius* / *minorRadius*) and *v* = 2π - arccos(*majorRadius* / *minorRadius*). The following inequalities must hold for the boundary parameters of the surface: *umin* < *umax*, *vmin* < *vmax*. The local coordinate system **position** can be either right-handed or left-handed. If the local coordinate system is right-handed, the normal is directed away from the tube of the surface; if the local coordinate system is left-handed, the normal is directed inward into the tube of the surface.