jnxd wrote: ↑Wed Feb 15, 2023 10:53 am
An inkscape-like tool maybe already possible with macros by changing knot multiplicity. Though I am often guilty of using "macro" as a word for some magic I imagine can be automated but haven't tried it myself. Also, I don't know how the inkscape tools exactly translate to B-spline terminology, so I need to work on that.
While I knew that one can quite easily convert between a Bézier and a Hermitian curve I was not aware that you can effectively represent a series of Bézier curves as a single B-spline! So inspired by your comment and this bit from the OCCT docs (thanks Carlo)...
... I was indeed able to get some Inkscape-like interface based on Sketcher's existing capabilities (increase/decrease knot multiplicity, construction lines and angle constraints).
- Adjusting the knot multiplicity as in the quote from OCCT docs, one gets the same as Inkscape's "corner node"
- Bildschirmfoto 2023-02-15 um 19.46.09.png (86.36 KiB) Viewed 2391 times
- Adjusting the knot multiplicity as in the quote from OCCT docs, and applying a 180° angle constraint, one gets the same as Inkscape's "smooth node"
- Bildschirmfoto 2023-02-15 um 19.48.06.png (86.8 KiB) Viewed 2391 times
- Adjusting the knot multiplicity as in the quote from OCCT docs, and applying a symmetric constraint, one gets the same as Inkscape's "symmetric node". In this picture, though, I reduced the node multiplicity again by one to get the same effect without the symmetric constraint.
- Bildschirmfoto 2023-02-15 um 19.49.08.png (83.3 KiB) Viewed 2391 times
So it seems that it is "only" a matter of the UI -- the OCCT base is there. By reducing some of the B-Splines degrees of freedom, namely by fixing its degree, the weight of the poles and the knot multiplicity, it can be coerced into an "SVG Path Style Series of Béziers". Or, with some minor transformation of the pole's positions, into a Hermitian Spline.
UX wise one could think about displaying what I've done with construction lines as "internal geometry", hide the circles for the pole's weight and put some special symbols instead of the 180° angle constraint and the symmetric constraint to express "corner node", "smooth node" and "symmetric node". And when moving some control point, the corresponding knot should be kept as sable as the other constraints permit. Right now "everything moves", which is explainable from a developer's point of view, but hugely counter-intuitive for a user.