Boolean ops unstable for "degenerate" paths
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Inkscape |
Fix Released
|
Medium
|
Unassigned |
Bug Description
As noted in Bug #168158, Inkscape (via the livarot library) quantizes path coordinates (effectively snapping to a fine grid) before applying Boolean operations. This usually works without any noticeable problems. However, when paths are so small that they are below the grid size, Inkscape can generate strange results from Boolean operations. This behaviour appears to be inconsistent across platforms/builds (perhaps different math models?), and therefore reproduction with a given data set is not guaranteed.
Results on Ubuntu 12.04, with Inkscape 0.49.x bazaar trunk rev 12472 are attached. Essentially, the source file (boolop_bug.svg) contains two paths - a tiny red path (only visible upon zooming in to the appropriate image area), and a much larger green "trellis" path (visible at normal zoom), on top of, and partially overlaypping, the tiny path. To reproduce, open the file in Inkscape, Select All, and perform Path/Difference. Expected result: the trellis should be subtracted from the tiny path (leaving nothing visible). Actual result: the tiny path takes on the trellis coordinates, and the trellis path is deleted. This can be seen in "boolop_
Performing the same steps on a Windows 7 x64 machine, running Inkscape 0.48.4, rev 9939, results in both paths being removed. While not exactly correct, this is an understandable result considering the path coordinates are quantized (perhaps resulting in the quantized tiny path being completely covered by the quantized trellis path, and hence completely removed upon subtraction).
Related branches
- Alvin Penner: Approve
- su_v (community): Approve
-
Diff: 46 lines (+31/-5)1 file modifiedsrc/splivarot.cpp (+31/-5)
tags: | added: boolops |
Changed in inkscape: | |
status: | Confirmed → Fix Released |
Results reproduced on OS X 10.7.5:
- stable version (Inkscape 0.48.4): both paths removed
- current trunk (r12472): the tiny path takes on the trellis coordinates, and the trellis path is deleted.