Draft CubicBezCurve

Description
The CubicBezCurve tool creates a Bezier Curve of third degree. This is one of the most commonly used curves in computer graphics applications. This tool allows you to create a big spline made of several 3rd-degree Bezier segments, in a way that is similar to the Bezier tool in Inkscape. A general Bezier curve of any degree can be created with Draft BezCurve.

The Draft BezCurve and the Draft CubicBezCurve tools use to define the position and curvature of the spline; on the other hand the Draft BSpline tool specifies the exact points through which the curve will go.



How to use

 * 1) Press the  button.
 * 2) Click a first point on the 3D view, and hold the mouse pointer.
 * 3) Drag the pointer to another point on the 3D view, and release the pointer.
 * 4) Move the pointer to another point on the 3D view to adjust the curvature of the spline, and click and hold on the point.
 * 5) Move the pointer to another point on the 3D view to adjust the final curvature of the spline, and then release the pointer. This creates a Bezier curve of 3rd degree, and continues drawing from the last point.
 * 6) Repeat the process of clicking, holding, dragging, and releasing to add points, and create further 3rd-degree Bezier segments.
 * 7) Press  or the  button, to complete the edition.

Scripting
Draft API and FreeCAD Scripting Basics.

See Draft BezCurve for the general information. A cubic Bezier is created by passing the option  to.

For each cubic Bezier segment four points must be used, of which the two extreme points indicate where the spline passes through, and the two intermediate points are control points.
 * If only 3 points are given, it creates a quadratic Bezier instead, with only one control point.
 * If only 2 points are given, it creates a linear Bezier, that is, a straight line.
 * If 5 points are given, the first 4 create a cubic Bezier segment; the 4th and the 5th points are used to create a straight line.
 * If 6 points are given, the first 4 create a cubic Bezier segment; the 4th and the other two points are used to create a quadratic Bezier segment.
 * If 7 points are given, the first 4 create a cubic Bezier segment; the 4th and the other three are used to create a second cubic Bezier segment.
 * In general, the last point in a group of four is shared with the following three points to create another curve.
 * To have smooth curves, with no straight segments, the number of points should be or, where  is the number of segments, for.

Example: