Oops, sorry, got Alvin's email address wrong. Now corrected.
On 4 July 2013 19:07, Eric Greveson <eric@...3003...> wrote:
Hi Alvin,
After updating to the latest Inkscape trunk, I've come across a regression
- boolean operations on paths no longer work correctly. It appears that
revision 12399 (Shape calculations - do not quantize the coordinates) is the culprit. I believe this commit attempts to fix the issue of path coordinates being rounded (and hence losing precision) - however, it looks like the boolean operation algorithms rely on this rounding to work correctly, and now fail with certain path data.
I've attached an example of an SVG file with two paths. If you "select all" and then perform a "Path/Difference" operation, it produces the expected result in 12398. If you perform these steps in 12399, both paths disappear. (If the attached file gets stripped out for some reason, it's also available at https://dl.dropboxusercontent.com/u/3442233/boolean_regression.svg).
I can understand how this error went unnoticed in simple tests - I tried drawing a couple of rects and doing a "difference" operation and it worked fine. Must be dependent on the exact shape of the path, perhaps my example file contains coordinates that give the difference algorithm some headaches due to floating-point precision issues (numbers being squared etc) that the coordinate rounding hides.
I guess the best option for now would be for someone to back out revision 12399. Alvin, hopefully my example SVG will allow you to find the source of the bug!
Best,
Eric