MbRevolutionSurface Revolution Surface
The MbRevolutionSurface class is declared in the surf_revolution_surface.h file.
The MbRevolutionSurface revolution surface belongs to the group of swept surfaces MbSweptSurface. The revolution surface is a special case of a swept surface with a spine curve in the form of a circle or its arc. The revolution surface is described by the generatrix curve MbCurve3D curve, the local coordinate system MbPlacement3D position, whose vector position.axisZ is the axis of revolution, the Boolean flag planeData indicating that the curve and the axis of revolution lie in one plane, the Boolean flag poleMin indicating that the surface has a pole at the initial value of the first parameter, the Boolean flag poleMax indicating that the surface has a pole at the terminal value of the first parameter, and the values of the first surface parameter at the poles of the surface uPoleMin and uPoleMax, if the corresponding pole is present. The surface also has some additional data that are optional and are used to speed up the execution of the surface methods.
The first surface parameter u coincides with the parameter of the generatrix curve. The first surface parameter takes values on the interval umin ≤ u ≤ umax, which corresponds to the domain of the generatrix curve. The surface can be periodic with respect to the first parameter if the generatrix curve is periodic.
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 generatrix curve. The surface can be periodic with respect to the second parameter. For a periodic surface, vmax - vmin = 2π; for a non-periodic surface, vmax - vmin < 2π.
In the PointOn( double u, double v, MbCartPoint3D & s ) method, the position vector of the surface s is described by the vector function
where M(v) is the rotation matrix. Note that the vector (curve(u) - position.origin) is multiplied by the matrix M(v) on the right. The rotation matrix has the form
The matrix A is the transformation matrix of the coordinates of the position vector of a point from the local coordinate system position to the global coordinate system. The rows of the matrix A are composed of the components of the basis vectors of the local coordinate system. The matrix M(v) maps the vector curve(u) - position.origin to the local coordinate system, rotates it in this system by the angle v around the axis of revolution, and maps the rotated vector back to the global coordinate system. The revolution surface is shown in Fig. 1:
Fig. 1
If the initial or terminal edge of the generatrix curve passes through the axis of revolution, then the surface has a pole for the parameter umin or umax, respectively. The following inequality must hold for the boundary values of the second surface parameter: vmin < vmax.
The points of the generatrix curve are rotated along an arc around the vector position.axisZ from the vector position.axisX in the direction of the vector position.axisY. The local coordinate system position can be either right-handed or left-handed.