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.
If the "download macros" preference is off, the macro will not yet have
a URL to load the data from. Make sure to load the macro before
attempting to display it. Also resolves the issue with macros being
unable to be installed under similar circumstances.
* 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.