Cut Path looses some segments

Bug #166302 reported by Aaron C Spike
66
This bug affects 9 people
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Medium
Alvin Penner
Nominated for 0.46.x by cypher3c
Nominated for 0.47.x by cypher3c
Nominated for Old by cypher3c

Bug Description

Using the Cut Path command throws away some segments
from the original path. This is very easy to reproduce
by cutting a single segment path by a rectangle
converted to a path. For an example see the attached png.

Revision history for this message
Aaron C Spike (acspike) wrote :
Revision history for this message
Buliabyak-users (buliabyak-users) wrote :

I cannot reproduce this. Could you please attach your SVG?

Revision history for this message
Aaron C Spike (acspike) wrote : cutting.svg

Other attachments

Revision history for this message
Aaron C Spike (acspike) wrote :

Not a problem. I just tried this again with the CVS built
this afternoon. I still can't seem to find a case where I am
unable to reproduce it. :)

Revision history for this message
ScislaC (scislac) wrote :

I have seen a number of peculiar things when using cut path.
I have seen what his screenshot shows, as well as paths not
cutting accurately. By not accurately I mean that sometimes
path segments are longer than they should be (they extend
beyond where the other object *should* have made the cut).

Hystrix (hystrix-)
Changed in inkscape:
status: New → Confirmed
Revision history for this message
cypher3c (cypher3c) wrote :

I am having the same problem.

Some paths cut into two pieces, but some only leave one piece

See uploaded sample.

Revision history for this message
EarlyBlake (pam4water) wrote :

I ran in to this problem a few times. This time, it not only lost some segments, but also wouldn't cut one path. These paths have been cloned and unlocked a few times. I don't know if that makes a difference. Also the some were produced from an interpolation between the outer curve and the inner straight line and exponent of like 0.4 (or so). I cut the straight up and down path 4 times with the square. The forth time seemed to get the desired result. I did the cut on a combined path. But it loses segments and wont cut when I break the paths apart also.

I also tried in the 03/12/09 developers version and got the same results. I'm currently on Vista 64 bit.

Revision history for this message
cypher3c (cypher3c) wrote :

I noticed that this seems to happen when there is a large number of large objects in a document.

Revision history for this message
Mike (kaufman) wrote :

I too have the same behavior with 0.47pre1 as well as with 0.46 on OS X. I can add some additional information:

The failure mode seems to depend on the z-order of the paths in question:
with a long line and short rectangle intersecting the line in two places:
        ____
       | |
 -----|----|----
       |___|

selecting the line and then selecting the rectangle and cutting ought to give me three (3) straight lines and no rectangle (at least that is what the manual leads me to believe).

Instead I get:
1: if the line is above the rectangle in z-order, the rectangle is cut into two pieces and the line is deleted.
2: if the rectangle is above the line in z-order, the line is cut and the rectangle is deleted, BUT I only get one of the three pieces of line; the middle and rightmost line-pieces are deleted as well.
So the 2 line-pieces getting deleted is definitely a bug in it's own right.

Using two rectangles instead of a single rectangle and a path shows what's really going on, without the confusion of the path-deletion in case 2 above:

The path doing the cutting (and getting deleted) is the uppermost path in z-order regardless of which path is selected first or second (which is what the manual [obliquely] says should happen).

Revision history for this message
Mike (kaufman) wrote :

I've been made aware that the status line of "Cut Path" does indeed tell be that the bottom path is the one cut. This is good as it explains a lot of the behavior I see, but the online Documentation for Cut Path is extremely poor if not positively misleading in this respect.

jazzynico (jazzynico)
tags: added: boolops shape-editing
removed: all-platforms other
Revision history for this message
Floop (floop) wrote :

I can reproduce the issue simply with two paths with one intersection. One cuts the other, but one of the two segments disappears. You can't control which one.

Revision history for this message
Rudolf Cardinal (rudolf-pobox) wrote :

Bug appears to be present still in Inkscape 0.48.2 r9819: cutting a line with another line throws away half the bottom line. A significant bug.

Revision history for this message
Advrk Aplmrkt (avkaplmkt) wrote :

I have reproduced this bug in Inkscape 0.48.2 r9819 on both Windows XP SP3 and Mac OS X 10.6.8 with the attached SVG. To reproduce:

(1) The SVG will open to show a black line on top of a green segmented line.

(2) Select the black line and the green line it is on top of and use the Cut Path tool.

(3) The portion of the green line below the black line will *disappear*, which reproduces the bug.

I have also attached a screenshot to illustrate (cut_path_bug.png). This bug is a showstopper for the work I am doing (I have to use Cut Path all the time), hopefully someone will take notice and provide a patch...

Revision history for this message
Advrk Aplmrkt (avkaplmkt) wrote :

Here is the screenshot to accompany my previous comment.

Revision history for this message
jazzynico (jazzynico) wrote :

Reproduced on Debian testing, Inkscape 0.48.3.1 and trunk revision 12110.

Changed in inkscape:
status: Confirmed → Triaged
Revision history for this message
Advrk Aplmrkt (avkaplmkt) wrote :

@jazzynico Sorry I don't have a lot of experience with bug reporting, but does status "Triaged" mean there is some sort of work around that I can try? Or has the bug been fixed in some way? Thanks!

Revision history for this message
jazzynico (jazzynico) wrote :

@Advrk Aplmrkt - According to http://blog.launchpad.net/general/of-bugs-and-statuses :
"This is an intermediate status that can be used to distinguish community-confirmed bugs from bugs that the official QA team has acknowledged and plans on working on."

It doesn't mean that we have a a workaround or that we're going to fix it *soon*, but only that we confirm that the bug exists and that it needs to be fixed.

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

fix committed to rev 12130

I believe this addresses all the examples shown above, but, as usual, any testing would be welcome

Changed in inkscape:
status: Triaged → Fix Committed
su_v (suv-lp)
Changed in inkscape:
assignee: nobody → Alvin Penner (apenner)
milestone: none → 0.49
Revision history for this message
David Carrier (dlcarrier) wrote :

As a workaround, try closing the paths involved. I have been able to always reproduce the bug with two open paths, with only one side of one path remaining. When cutting a closed path with a straight, single-segment open one, so far I have had both portions of the closed path remain.

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.