MbLoftedSurface Surface Based on a Family of Curves

Class MbLoftedSurface is declared in file surf_lofted_surface.h.

Surface MbLoftedSurface is defined by a set of curves RPArray< MbCurve3D > uCurves, a set of values of the second surface parameter for the curves vParams, a set of flags of identical curves vLabels, boundary values of parameters umin, umax, vmin, vmax, flags of closure of the surface in the first and second parameters uClosed and vClosed, a direction vector of a non-periodic surface at vmin MbVector3D derive1, a direction vector of a non-periodic surface at vmax MbVector3D derive2, and flags of the presence of poles of the surface at the boundary of the domain poleUMin, poleUMax, poleVMin, poleVMax. The surface also has some additional data that are not mandatory and are used to speed up the work of the surface methods.

The first parameter of the surface u coincides with the parameters of curves curves. All curves curves must have the same parameter domain; for this purpose, curves MbReperamCurve3D can be used. The first parameter of the surface takes values on the segment umin ≤ u ≤ umax, which corresponds to the domain of curves curves. The surface can be periodic in the first parameter if all curves of set curves are periodic.

The second parameter of the surface v takes values on the segment vmin ≤ v ≤ vmax. Value v = vmin corresponds to the initial value of set vParams[0], and value v = vmax corresponds to the final value of set vParams[vParams.MaxIndex()]. The surface can be periodic in the second parameter.

If all curves of set curves are different, then values of set vLabels equal the indices of the curves of set curves. If among adjacent curves of set curves there are identical curves (but shifted relative to each other), then the corresponding values of set vLabels equal the minimum index of the replicated curve of set curves.

In method PointOn( double u, double v, MbCartPoint3D & s ) the radius vector of the surface s is described by the vector function

\begin{equation} \mathbf{s}(u, v) = (1 - 3w^{2} + 2w^{3}) \, \mathbf{curves}[i](u) + (3w^{2} + 2w^{3}) \, \mathbf{curves}[i+1](u) + (w - 2w^{2} + w^{3}) \, \mathbf{derive}[i](u) + \\ (-w^{2} + w^{3}) \, \mathbf{derive}[i+1](u) (\mathit{vParams}[i+1] - \mathit{vParams}[i]), \end{equation}

where

\begin{equation} w = \frac{v - \mathit{vParams[i]}}{\mathit{vParams[i+1]} - \mathit{vParams[i]}}, \end{equation}

derive[i] and derive[i+1] are derivatives of curves curves[i] and curves[i+1], respectively. Index i of the working segment for computing the radius vector of a point and its derivatives is determined from the condition vParams[i] ≤ v ≤ vParams[i+1]. If among neighboring elements of set vLabels there are identical values, then between the corresponding curves the surface is equivalent to an extrusion surface. Surface based on a family of curves is shown in Fig. 1:

../../../../_images/O.5.15.1.png

Fig. 1

The shape of the surface depends on the arrangement of the curves and on set vParams of parameter values at which the surface passes through the curves. To prevent self-intersections of the surface, values of set vParams must vary proportionally to the average distance between the curves.

Curves of the surface s(const, v) with parameters u = const are Hermite curves MbHermit3D. The surface may have poles if the first and/or last curve of set curves is contracted to a point, or if all curves curves coincide at one of the ends.