← Back

October 15, 2019

Offsetting Curves and Surfaces with Variable Displacements

by Sergey Biryukov, C3D Toolkit product manager

September’s new revision of the C3D Toolkit includes new ways to construct offset curves in two- and three-dimensional space, as well as to offset surfaces. This is done by specifying a parameter for the type for curve or surface, and the upper and lower limits for the offset distances.

The original API classes MbOffsetCurve and MbOffsetCurve3D constructed only equidistant curves, ones where each point is transferred by a certain vector relative to the corresponding point on the base curve. Two-dimensional curves use a normal.

The new constructors provided in these classes create curves where the displacement vector of the points changes according to a linear or cubic rule. Users then set an offset value for the minimum and maximum values of the curve parameter, and then indicate the type of change in this value.

The previous equidistant method of curve construction can still be obtained by setting the offset type to a constant value.

The class constructors can be seen in the online documentation pages, as follows:
https://c3d.ascon.net/doc/math/class_mb_offset_curve.html
https://c3d.ascon.net/doc/math/class_mb_offset_curve3_d.html


Fig. 1. Offset 3D curve with the variable shift distance.

For 3D surfaces, the MbOffsetSurface class is similarly enhanced. This new class of constructor offsets surfaces with a variable displacement, relative to the base. In this case, users choose a point transfer vector with constant, linear, or cubic rules.

The offset value is usually set at the four corners of the rectangular parametric area of the surface. For surfaces that have one of their parameters closed, a displacement of only two points needs to be specified – provided that they do not coincide in space with the minimum value of the parameter; the offset surface that is created is also closed. Figure 2 shows a surface with a variable cubic displacement constructed on a cylindrical surface.


Fig. 2. A surface with a variable displacement.

You can read more about this class and constructor parameters at https://c3d.ascon.net/doc/math/class_mb_offset_surface.html


REQUEST AN EVALUATION  

Google+