The first and last knots (which are often also poles) of a B-Spline are not
represented in sketcher as knots, but as end points of the curve. This creates a
problem when we want to change the multiplicities of those knots. As a
workaround, these points are treated differently.
NOTE: While it is technically possible to have end knots in a non-periodic
spline with degree <= degree of the curve, `Geom_BSplineCurve::RemoveKnot()`
fails for the first and last knots, so we are stuck with this. So, this commit
effectively only makes knot multiplicity change possible for periodic splines.
For non-periodic splines this commit just changes the confusing "no knot is
selected" message to an unhelpful "multiplicity modification failed".
Here, point and click means we can move the cursor around and select a point on
the curve, instead of having to enter a value in a dialog (just like we do for
geometry creation and constraints). Continuous mode is also supported, but these
only apply to one B-Spline which should selected before pressing the tool button.
A `DrawSketchHandlerBSplineInsertKnot` is created to handle all the graphical aspects.
Finer control may be desirable but that awaits tool settings task box or similar
changes where keyboard input can be used.
Made some changes as per comments by @abdullahtahiriyo. Also change `activated`
to follow recent NVI changes.
* fix -Winconsistent-missing-override
* fix -Woverloaded-virtual that is also a bug because the DrawSketchHandlerArcOfParabola didn't set the suitable mouse cursor
==============================================================
With the introduction of overridable default behaviour for commands, it makes sense to keep control of the execution path of the activation and deactivation.
Non-virtual interface pattern enforces execution control of the virtual functions, while allowing the behaviour to be overriden in a case by case basis.
Apparently B-Spline knot insertion is challenging the sketcher update process
and spurious GUI updates sometimes occur in the intermediate step after the
knot is inserted but before the internal geometries are re-defined. This set of
comments points to a previous fix and related discussion as a suggestion.
Knot insertions dialog uses decimal precision from preferences.
Sets the spinbox step for knot insertion dialog such that it goes from min to
max knot in 1000 steps.
Removes the mention of multiplicity option from the tooltip.