[snapping] snap node to midpoint of 'z' segment closing a path fails

Bug #590486 reported by su_v
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Low
Diederik van Lierop

Bug Description

Inkscape 0.47+devel r9486 on OS X 10.5.8, default settings

Snapping nodes to midpoints of 'z' segments closing a path fails. This is important because recently all shapes created with Inkscape and converted to paths are closed with 'z' if the last segment is a straight line (prior to the change the first and last node have been coinciding as well as closed with 'z').

Steps to reproduce:
1) draw a line with the pen tool
2) draw a rectangle and convert it to path
3) set 'Snap nodes and handles' with snap target 'Snap from and to midpoints of line segments'
4) drag the line to snap one of the end nodes to the left vertical edge of the (converted) rectangle

Expected result:
Node snaps to midpoint of the path segment.

Actual result:
No snap target is found.

Reproduced with rectangle, star, polygon and paths drawn with the pen tool and closed with a straight line.

Note: revision 9076 and 9079 added 'prevent a redundant closing line segment' when converting a rectangle, star or polygon to path and when creating a path with the pen (bezier) tool.

su_v (suv-lp)
tags: added: regression
Revision history for this message
jazzynico (jazzynico) wrote :

Confirmed on Ubuntu 10.04 and Windows XP, Inkscape r9490.

Found something weird, after creating the same rectangle (200x200, bottom left, and converted to shape) in 0.47 and r9490 (same preferences).
With 0.47 the path is: m 0.5,851.86218 200,0 0,200.00002 -200,0 0,-200.00002 z
With r9490, I get: m 0.5,851.86218 200,0 0,200.00002 -200,0 z

The issue is not reproduced if the rectangle created in 0.47 is copied to r9490, but I still got the bug if I copy the rectangle from r9490 to 0.47.

Changed in inkscape:
status: New → Confirmed
Revision history for this message
su_v (suv-lp) wrote :

> Found something weird, (…)

That's not weird but intentional ;-) The differences in the path data are AFAIU the result of revision 9076 and 9079.

Unfortunately that change appears to have unintended side-effects: so far some extensions are known to create visibly open paths (see #542260, bug #586597 and also bug #202540) and snapping to midpoint of segments fails unexpectedly. Since in prior versions most (all ?) paths created with Inkscape have a 'z' segment connecting the two coinciding end nodes I guess it was purposely not considered as a snap target: the ambiguity in the GUI of the number of nodes of closed paths doesn't make it easy to determine if a 'z' segment is visible to the user as segment or not (<https://bugs.launchpad.net/inkscape/+bug/542260/comments/8>).

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

Updated list:

Unfortunately that change appears to have unintended side-effects:
1) path-modifying extensions (bug #542260, bug #586597, bug #202540)
2) snap to midpoint of segment
3) connector lines: 'z' segments are ignored (even for unconverted shapes): the connector line starts from the center and not at the object boundary if it crosses a 'z' segment closing a shape.

Revision history for this message
Diederik van Lierop (mail-diedenrezi) wrote :

Rev. #9627 should have fixed the snapping to the closing segments

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

fix confirmed with Inkscape 0.48+devel r9627 on OS X 10.5.8 - thx :)

su_v (suv-lp)
Changed in inkscape:
milestone: none → 0.49
status: Confirmed → Fix Committed
su_v (suv-lp)
Changed in inkscape:
assignee: nobody → Diederik van Lierop (mail-diedenrezi)
importance: Undecided → Low
Bryce Harrington (bryce)
Changed in inkscape:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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