Created attachment 116009 [details] Screenshot of before and after operation SUMMARY When performing a logical operation on two or more vector shapes, the resulting object has many extra nodes. STEPS TO REPRODUCE 1. add two vector shapes 2. perform a logical operation (right-click--> Logical Operations --> Unite (or intersect and subtract) 3. select shape with Edit Shapes Tool OBSERVED RESULT The resulting shape has way more nodes than the originals EXPECTED RESULT The Number of nodes should stay the same (or less, depending on the shapes) SOFTWARE VERSIONS (available in About System) KDE Plasma Version: KDE Frameworks Version: Qt Version: ADDITIONAL INFORMATION
I am confirming this, but setting it to a wishlist item. I remember we discussed this for a while when working on vectors. The work it would take to simplify the shapes from Unite operations was going to be quite a bit of time, so we deferred doing the work until later.
Version 4.3.0 (2020) and error still is present. Would be great if its fixed. Thanks.
I read about this project on GSoC's ideas page and I was intrigued enough to do some research. The project is currently implemented using Qt's built-in `QPainterPath::united()` method, where Qt converts a Bezier curve into a straight line segment before manipulating it, leading to the current issue. I think the easiest way to fix this is to port the code for the polygon boolean operations from Libreoffice source code(`basegfx`) to Krita. The operations we want are provided in Libreoffice's `b2dpolypolygoncutter.cxx`. LibreOffice uses the MPL 2.0 license, which is compatible with Krita's GPLv3. The Vatti and Greiner-Hormann algorithms are both possible options if we were to implement clipping from scratch, but the online descriptions I could find of these algorithms only cover operations on straight-line paths, and I'm uncertain whether they can be used for Bessel curves. (Specifically, I think the Greiner-Hormann algorithm may be applicable to Bessel curves without much modification, and I am not sure about many details of the Vatti algorithm)