Draw freehand lines tool very inaccurate, especially when drawing slowly

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

Bug Description

If drawing a freehand line, it ends in the wrong place (but starts in the right place). While drawing, it shows a green curve in the right place, but when I release the mouse button, the resulting line appears in the wrong place. If I draw it quickly, it's almost right, but if I draw slowly and carefully, it ends in the wrong place and doesn't follow the curve I drew.

If I zoom out a lot, it looks right even if I draw slowly. If I zoom in a lot, it's wrong no matter how fast I draw.

Snapping is disabled.

Left half of the screenshot is the curve I actually drew in green (with a hand-drawn mouse cursor), then when releasing the mouse button (and reducing the line width to 0.01 px), it resulted in the right half of the screenshot. The orange circle is there for dramatic effect. It was at maximum zoom, where the effect is most noticeable.

Revision history for this message
Cyp (cypcyp) wrote :
Revision history for this message
Mc (mc...) wrote :

Which inkscape version ? Can't reproduce on master

Changed in inkscape:
status: New → Incomplete
Revision history for this message
Cyp (cypcyp) wrote :

Must have been inkscape-0.92.3, since that's what I had installed at the time I reported.

Cyp (cypcyp)
Changed in inkscape:
status: Incomplete → New
Revision history for this message
Alvin Penner (apenner) wrote :

could you attach the svg file that is associated with your screenshot.
I cannot reproduce this bug, but I've seen some strange behavior when drawing at very high zoom levels, which I have reported separately as:
https://bugs.launchpad.net/inkscape/+bug/1796650

Revision history for this message
Cyp (cypcyp) wrote :

I'm not sure why I'm not getting such extreme deviations as before, but the three black lines in the attached .svg were drawn exactly within the bounds of the cyan curve (starting at the top), and somehow ended up ending a bit too far to the left (seemingly by about the same amount each time).

Revision history for this message
Cyp (cypcyp) wrote :

I tried changing the units from px to cm and changing it to 0.001 user units per cm, and got a much more extreme result, attached.

Revision history for this message
Alvin Penner (apenner) wrote :

- reproduced on Windows 10, Inkscape 0.92.3 (2405546, 2018-03-11)
- using the file freehand3.svg

- seems to require three things:
1. zoom in a lot, to 25600%
2. use narrow stroke width 0.01 px
3. draw very slowly

Changed in inkscape:
status: New → Confirmed
Revision history for this message
Alvin Penner (apenner) wrote :

problem is probably caused by accumulated roundoff error. Attached is a typical excerpt from a line. The precision of the individual points is extremely poor, in some cases no better than about 20% accuracy. If you take hundreds of these, as there typically are, and if you accumulate them, you will get a noticeable amount of error. And the error seems to be an underestimation, so the data are probably being consistently rounded down, which is not a good idea. (I have no idea why the speed should matter.) here is some data:

-0.003,0.0044 -0.006,0.0055 -0.005,0.0023 -0.0176,-0.0023 -0.0221,0 -0.002,0.0012 -0.003,0.0044 -0.006,0.0055

Revision history for this message
Qantas94Heavy (qantas94heavy) wrote :

Hi there, we're migrating bugs over to our new GitLab bug tracker. Please follow there for future updates.

If you have a new bug, please file them here: https://inkscape.org/report. Thank you!

Moved to: https://gitlab.com/inkscape/inkscape/issues/74
Closed by: https://gitlab.com/Qantas94Heavy

tags: added: bug-migration
Changed in inkscape:
status: Confirmed → Invalid
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.