MbCurveSpiral Variable Radius Spiral

The MbCurveSpiral class is declared in the cur_curve_spiral.h file.

The variable radius spiral is derived from the MbSpiral curve. The spiral is defined by the local coordinate system MbPlacement3D position, the two-dimensional curve curve specifying the radius law, the spiral pitch step, and two boundary parameters of the spiral tmin and tmax. The curve also has some additional data that is optional and is used to speed up the curve methods.

The spiral axis coincides with the position.axisZ axis of the local coordinate system. The two-dimensional curve curve lies in the XZ plane of the local coordinate system and defines the radius variation law of the spiral. The position.axisZ axis serves as the abscissa axis, and the position.axisX axis serves as the ordinate axis of the two-dimensional space of the curve. The origin of the two-dimensional coordinate system of the curve coincides with the origin of the local coordinate system position. The spiral radius is equal to the ordinates of points of the two-dimensional curve curve. The tmin and tmax parameters are angles measured from the position.axisX vector to the position.axisY vector. Angle values that are multiples of 2π correspond to points of the curve in the XZ plane of the local coordinate system.

In the PointOn( double & t, MbCartPoint & r) method, the radius vector of the curve r is described by the vector function

\[\mathbf{r}(t) = \mathbf{position.origin} + radius(t) \left( \cos(t) \cdot \mathbf{position.axisX} + \sin(t) \cdot \mathbf{position.axisY} \right) + \left( t \cdot \frac{step}{2\pi} \right) \mathbf{position.axisZ},\]

where radius(t) is the local radius. The local radius radius(t) is computed as follows. For a given parameter t, the abscissa t·step / 2π of the required two-dimensional point of the curve is determined. Then the intersection point of the curve and the vertical line intersecting the abscissa axis at t·step / 2π is found. The ordinate of the two-dimensional intersection point of curve and the vertical line is equal to the required spiral radius radius(t). The local radius is equal to the distance from the local abscissa axis to the intersection point of the vertical line with the curve in the two-dimensional space of the XZ plane of the local coordinate system position.

The variable radius spiral is shown in the figure:

../../../../_images/O.4.15.1.png

The curve must lie above the abscissa axis and must not intersect the abscissa axis of its two-dimensional coordinate system. The curve must not have vertical tangents. For the boundary parameters, the inequality tmin < tmax must hold. The curve cannot be periodic.

The local coordinate system position can be either right-handed or left-handed.