Improved Bezier intersection algorithm
Open, Needs TriagePublic

Description

To implement smarter boolean operations on vector shapes by improved Bezier intersection algorithm

Goals

  • Create a new algorithm to compute intersections of Bezier curves using implicitization
  • Manage the dependencies and implement parts of Qt private modules in Krita codebase
  • Integrate the algorithm with current intersection finding routine
  • Implement the new routine for boolean operations
  • Write proper documentation and unit tests for all the above goals while doing them
earendil created this task.Jun 12 2021, 5:47 PM
earendil updated the task description. (Show Details)Jun 12 2021, 5:56 PM

The short review for the code existing atm:

The code look very good in general. There are some issues with the coding style and documentation, but that is understandable, since it is a proof of concept atm. The tests for the code run fine under santizer, so it seems to be very good code :)

Here are my notes from checking the code codewise:

  1. When comparing floating point values, you need to use qFuzzyCompare() and qFuzzyIsNull() instead of direct comparison (e.g. in c-tor of class 'Line')
  2. Use qreal instead of explicit double unless really needed
  3. In kisintersectionfinder.cpp: fuzzyIsNull(), comparePoints() and dot() functions -- you can (and probably should) reuse the same functions from KisAlgebra2D