Comment 4 for bug 997105

Revision history for this message
Pieter Barendrecht (pieter-redpanda) wrote : Re: [Bug 997105] Re: No handle at first (and sometimes last) nodes of a Bézier curve

Thanks for your elaborate reply! I agree, the path shouldn't be changed,
so all three paths you drew are not acceptable.

I didn't realize that the part after the "c" is relative, so the (0,0)
indeed means that the first handle is at the same position as the control
point. So there _is_ a handle, but it is invisible -- and therefore it is
not possible to move. Wouldn't you call this a problem?

I thought about a solution. It's not perfect, but what about this: if the
user creates a path like the way I described, I would suspect a quadratic
Bézier curve -- so two control points and just one handle. So in the
preview (when dragging the mouse), draw the quadratic Bézier curve. As
soon as the mouse button is released, degree-elevate the quadratic curve
to a cubic one. The curve will look exactly the same, but the existing
control point will be moved and another one will be added.

> 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>
>
> ** Attachment added: "997105-handle-of-first-node-1.svg"
> https://bugs.launchpad.net/inkscape/+bug/997105/+attachment/3138543/+files/997105-handle-of-first-node-1.svg
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/997105
>
> Title:
> No handle at first (and sometimes last) nodes of a Bézier curve
>
> Status in Inkscape: A Vector Drawing Tool:
> New
>
> Bug description:
> When I create a new Bézier curve (consisting of a single curved
> segment) in Inkscape (0.48.3.1 r9886), the first node doesn't have a
> handle. Procedure:
>
> - For the first node, click on the canvas (and release the mousebutton
> without dragging first)
> - Then click somewhere else on the canvas, drag your mouse such that a
> nice curved curve appears, and release the mousebutton
> - Press <Enter> to end the curve
>
> When using the Node Tool (F2) to check the nodes, you can see that the
> first node doesn't have a handle (or is it so small such that you
> cannot see it?)
>
> I know that I _can_ create a handle by clicking and dragging for the
> first node, but I also expect a handle when following the above
> procedure.
>
> Operating System: Arch Linux, 32 bits, 3.3.4-2-ARCH Kernel.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/inkscape/+bug/997105/+subscriptions
>