No handle at first (and sometimes last) nodes of a Bézier curve

Bug #997105 reported by Pieter Barendrecht
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Invalid
Undecided
Unassigned

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.

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

> but I also expect a handle when following the above procedure.

Why?

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

Because as far as I know, Inkscape can only handle cubic Bézier curves
(when I open something with quadratic Béziers, they get degree elevated to
cubic Béziers).

The tool says "Bézier curve", so the object should either be linear (a
straight line), a quadratic one, or a cubic one. If there is just one
handle, that suggests that it is a quadratic Bézier curve. But that isn't
the case -- when I look to the saved .SVG file, it says that it's a cubic
Bézier -- which should have two handles, since you need 4 points to draw a
cubic Bézier curve.

Pieter

>> but I also expect a handle when following the above procedure.
>
> Why?
>
> --
> 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
>

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>

Revision history for this message
Pieter Barendrecht (pieter-redpanda) wrote :
Download full text (4.2 KiB)

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 someti...

Read more...

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

> 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 don't see there a problem - In the node tool, you can easily extract (and retract) handles:

From the Inkscape keyboard and mouse reference:
Move node handle (mouse):
 - (…)
 - Ctrl+click retract the handle
  Retracted handle is zero length; use Shift+drag to drag it back out.

<http://inkscape.org/doc/keys048.html#d0e3383>

Revision history for this message
Pieter Barendrecht (pieter-redpanda) wrote :

Ah I see, I didn't know about that. Guess I should take more time to read
the information displayed in the statusbar. Problem solved, thanks for
your help!

Pieter

>> 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 don't see there a problem - In the node tool, you can easily extract
> (and retract) handles:
>
>>From the Inkscape keyboard and mouse reference:
> Move node handle (mouse):
> - (…)
> - Ctrl+click retract the handle
> Retracted handle is zero length; use Shift+drag to drag it back out.
>
> <http://inkscape.org/doc/keys048.html#d0e3383>
>
> --
> 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
>

Revision history for this message
Shriramana Sharma (jamadagni) wrote :

Should this bug be closed as INVALID then?

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

Pieter Barendrecht wrote:
> Problem solved, (…)

Closing as 'Invalid' based on the reporter's feedback.

Changed in inkscape:
status: New → Invalid
Revision history for this message
Timmmm (tdhutt) wrote :

I just ran into this. Definitely looks like a usability bug to me. How many (good) programs keep parts of their UI entirely invisible unless you *shift-drag* them?!

I would suggest that the fix is to always draw the circular handle on top of the diamond handle, even for zero length.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.