Union adds bogus node

Bug #723559 reported by aditsu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Medium
Unassigned

Bug Description

Inkscape 0.48 as well as trunk (r10068) on Gentoo Linux.
See the attached file, test.svg - there are 8 paths, each one with 4 nodes, and each node matches a node from another path. If I select all the paths and do union, a new node gets added in the inner top left area. The new node is not only unnecessary, but it actually makes the arc go a little bit above the top line, thus making the inner shape concave.

Tags: boolops
Revision history for this message
aditsu (aditsu) wrote :
su_v (suv-lp)
tags: added: boolops
Revision history for this message
aditsu (aditsu) wrote :
Revision history for this message
aditsu (aditsu) wrote :
Revision history for this message
aditsu (aditsu) wrote :

Same problem happens when the paths are already joined (so there's only one path on which I do union). I've actually broken apart the inner and outer paths and kept only the inner one, see the attached file.

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

Possibly related to bug #168158 “Path Boolean operations are imprecise”
<https://bugs.launchpad.net/inkscape/+bug/168158>

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

Reproduced with the attached sample drawing 'test.svg' in Inkscape 0.48+devel r10067 on OS X 10.5.8 (i386).

However, not reproduced with attached sample '723559-test-3.svg', using the same paths, but with drawn with more precision:
- all coinciding nodes really coincide
- all nodes are snapped to full pixel values (as seen in the XML Editor, related to the SVG coordinate system in the upper left corner, and a page height with full pixel value - no decimal places like with default A4).
- 2 redundant nodes of each corner piece removed

In '723559-test-3.svg', no additional node is inserted into the result after unioning the 8 paths.

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

Same for 'test2.svg':

Reproduced as is with current trunk (r10067).

Not reproduced when
- nodes snapped to full pixel positions (relative to SVG coordinate system origin)
- handles of all straight line segments retracted

In '723559-test2-2.svg' (attached) no additional node is inserted after unioning the path with itself.

IMHO this is a duplicate of or at least closely related to bug #168158 (see comment #6 there).

Changed in inkscape:
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
aditsu (aditsu) wrote :

I hadn't noticed the imprecise positions before reporting the bug.
Indeed, the problem seems related to the other bug.
Let me know if I can help fix it. I'm fairly good at algorithms but my C/C++ is a bit rusty and also I don't have plenty of spare time.

Revision history for this message
Beluga (buovjaga) wrote :

No repro with test.svg. Please re-test.

Arch Linux 64-bit, KDE Plasma 5
Inkscape 0.92pre1 15054 (GTK3)

Revision history for this message
jazzynico (jazzynico) wrote :

Bug reproduced on Windows XP (32-bit), Inkscape 0.48.5.
Not reproduced with 0.91 and lp:inkscape/0.92.x rev. 15214.

Changed in inkscape:
milestone: none → 0.91
status: Confirmed → Fix Released
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.