Dear Inkscape-devel,
I have these two paths (Geom::Path, or two Piecewise<D2<SBasis>> if you want), and I would like to join them smoothly (C1, to be precise), in code. Is there an API provided to achieve this task?
What I am trying to achieve is obvious to do using Node Tool by first “Join selected nodes" and then “Make selected nodes symmetric”, but I am not sure how to achieve this in code using Geom::Path easily because it doesn’t have a notion of “node” to manipulate. I can setInitial() or setFinal() or setPoint() manually, but since the feature in already there in the code, although in the parts I do not yet understand (PathManipulator), I figured I should ask. Thank you!
Regards, _______________________ Papoj "Hua" Thamjaroenporn papojt@...3117...
You need to recreate the joined curves with the points of the wanted result, you can use Geom::CubicBezier casting to know the actual "handles". You cas see in action in BSpline LPE for example.
Also you need a function to make one handle symetric, so you need the 2Geom point "polar" function to get a point in a angle at a distance (Some code in fillet-chamfer LPE)
Cheers, Jabier.
El lun, 14-12-2015 a las 00:37 -0500, Papoj Thamjaroenporn escribió:
Dear Inkscape-devel,
I have these two paths (Geom::Path, or two Piecewise<D2<SBasis>> if you want), and I would like to join them smoothly (C1, to be precise), in code. Is there an API provided to achieve this task?
What I am trying to achieve is obvious to do using Node Tool by first “Join selected nodes" and then “Make selected nodes symmetric”, but I am not sure how to achieve this in code using Geom::Path easily because it doesn’t have a notion of “node” to manipulate. I can setInitial() or setFinal() or setPoint() manually, but since the feature in already there in the code, although in the parts I do not yet understand (PathManipulator), I figured I should ask. Thank you!
Regards, _______________________ Papoj "Hua" Thamjaroenporn papojt@...3117...
Inkscape-devel mailing list Inkscape-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-devel
participants (2)
-
Jabier Arraiza
-
Papoj Thamjaroenporn