.. role:: blue :class: blue MbCurveBoundedSurface Surface with Arbitrary Borders ======================================================== .. _MbCurveBoundedSurface_Surface_with_Arbitrary_Borders_: .. версия ядра: 1180ХХ Class :blue:`MbCurveBoundedSurface` is declared in the *surf\_curve\_bounded\_surface.h* file. The surface :blue:`MbCurveBoundedSurface` is defined by the base surface :blue:`MbSurface` **basisSurface**, the set of boundary curves RPArray<:ref:`MbContourOnSurface `> **curves** (contours on the surface), and the boundary values of the parameters *umin*, *umax*, *vmin*, *vmax* that define the bounding rectangle of the parameter domain. The surface :blue:`MbCurveBoundedSurface` has curvilinear edges and can have arbitrary cutouts inside. The boundaries of the surface are described by the contours on the surface of the container **curves**. In the :blue:`PointOn`\( double *u*, double *v*, :ref:`MbCartPoint3D ` & **s** ) method, the radius vector of the surface **s** is described by the vector function .. math:: \mathbf{s}(u, v) = \mathbf{basisSurface}(u, v), \quad u, v \in \Omega, where :math:`\Omega` is the parameter domain, which is a two-dimensional connected region. The radius vector of the contour-bounded surface is described by the same law as the surface **basisSurface**, but has a different parameter domain. The base surface and the contours on it are shown in Fig. 1: .. figure:: /MODELER/SURFACES/pictures/O.5.27.1.png :width: 12cm :align: center Fig. 1 In the general case, the parameter domain :math:`\Omega` of the contour-bounded surface may extend beyond the parameter domain of the surface **basisSurface**. Outside the parameter domain of the surface **basisSurface**, the radius vector **r**\(*u*, *v*) is computed by the method :blue:`_PointOn`\(*u*, *v*, **s**) in accordance with the extension rules of the surface **basisSurface**. The surface with an arbitrary boundary is shown in Fig. 2: .. figure:: /MODELER/SURFACES/pictures/O.5.27.2.png :width: 12cm :align: center Fig. 2 Each curve of the container **curves** describes one closed boundary of the surface. Each curve of the container **curves** is a contour on the surface :ref:`MbContourOnSurface `. Each contour on the surface is described by a surface **surface** coinciding with **basisSurface**, and a two-dimensional contour **contour**. The contour **contour** is a composite closed two-dimensional curve. The segments of the contour **contour** can be any two-dimensional curves :ref:`MbCurve ` except composite curves :ref:`MbContour `. In the general case, the derivatives of the contour undergo a discontinuity in length and direction at the junction points of the segments. The two-dimensional contours describe the boundaries of the parameter domain :math:`\Omega` of the surface :blue:`MbCurveBoundedSurface`. The boundary contours of the container **curves** satisfy the following conditions: they do not intersect themselves or each other; the first contour **curves**\[0] of the container describes the outer boundary and contains all other contours inside, which describe the inner cutouts in the surface. The inner contours cannot be nested inside one another. To quickly determine the position of a given two-dimensional point relative to the parameter domain of the surface, the boundary contours are oriented so that when moving along the boundary the surface is always to the left when looking in the direction opposite to the surface normal. Thus, the outer contour is oriented so that it is traversed counterclockwise when looking at the surface in the direction opposite to its normal, and the inner contours are oriented in the opposite direction. The base surface **basisSurface** cannot be a surface with arbitrary boundaries :blue:`MbCurveBoundedSurface`. If a surface with arbitrary boundaries needs to be constructed on the basis of another surface with arbitrary boundaries, the base surface of the latter must be used as the base surface.