Comment 3 for bug 997105

Revision history for this message
su_v (suv-lp) wrote :

Based on the logic of Inkscape's pen tool [1]:
Please open attached SVG file in Inkscape - which of the three lower solutions would you propose Inkscape to "guess" if the user only draws the handle control point of the second node (top-most path)? Whatever Inkscape "adds" to the first node does change the geometry of the curve, and no longer matches the path the user originally created with the pen (bezier) tool.

(<opinion>my intention when creating the path was the top-most one - personally I would not expect (nor ever accept) that Inkscape converts my input automagically into any other solution</opinion>).

Based on the SVG path data [2]:
> since you need 4 points to draw a cubic Bézier curve.

From the SVG 1.1 specification: curveto (x1 y1 x2 y2 x y)+
Draws a cubic Bézier curve from the current point to (x,y) using (x1,y1) as the control point at the beginning of the curve and (x2,y2) as the control point at the end of the curve.

The path data of the initial path created with the pen tool:
d="m 100,100 c 0,0 150,-50 200,0"

The path data of the three lower paths (duplicates of path1, handle of the first node extracted with the node tool, using varying lengths and angles, positioned by snapping to grid):
d="m 100,200 c 100,0 150,-50 200,0"
d="m 100,250 c 50,-50 150,-50 200,0"
d="m 100,150 c 50,50 150,-50 200,0"

Are you suggesting that a relative distance of '0,0' for the first control point (x1,y1) from the starting point of the cubic bezier curve (aka a retracted handle) is invalid SVG?

Maybe you are actually looking for a special mode of the pen tool to generate symmetric curves with two nodes (instead of creating nodes (of multi-segment paths) with symmetric colinear handles [1])?

--
[1] <http://tavmjong.free.fr/INKSCAPE/MANUAL/html/Paths-Creating.html#Paths-Bezier>
[2] <http://www.w3.org/TR/SVG11/paths.html#PathDataCubicBezierCommands>