
2014-02-27 10:56 GMT+01:00 Bryce Harrington <bryce@...961...>:
The primary shortcoming of the CGAL algorithm is that is requires monotonization of the input curves, which leads to some unnecessary nodes being added, but this can be circumvented by storing pointers to the information about the original curve in the subdivided curves and then removing the superfluous subdivisions.
Even if we do end up depending on CGAL, I think there's still a lot of value in 2Geom, since at first glance the CGAL APIs look verbose and somewhat hard to use.
Could the CGAL algorithms you need be lifted and ported to 2geom?
CGAL evaluates things in arbitrary precision floating point arithmetic (using the MPFR library) if the result in doubles is ambiguous, which guarantees accurate results in edge cases. If the boolean algorithms depend on this, then it will be hard to extract all the necessary things into 2Geom, though I have not checked this yet. If they don't, it should be fairly simple.
CGAL also has a few other things I will need later when implementing the OpenGL renderer, for instance triangulation algorithms.
Regards, Krzysztof