Regarding CGal use, you may want to ask on the 2geom devel list about it (if no one answers here). http://lists.sourceforge.net/lists/listinfo/lib2geom-devel
Cheers, Josh
On Wed, Aug 7, 2013 at 8:43 AM, Eric Greveson <eric@...3003...> wrote:
Hi devs,
I'm looking at Boolean operations (particularly Difference ops) on real-world SVG files again, and I've come across another bug, which I've reported here for posterity: https://bugs.launchpad.net/inkscape/+bug/1209281. This comes with a sample SVG file which might reproduce the bug. Note that I say "might" because it is reproduced on the current trunk on my x86 Ubuntu 12.04, but not on the latest Windows build I'm running (0.48.4).
I aim to have a look into what's going on here and hopefully come up with a patch - I've looked through the livarot code in a bit of detail now, and I think I understand at a basic level how the various path-intersection algorithms are implemented (particularly wrt quantization of coordinates and the implications for the sweep-line method).
Meanwhile, a couple of questions:
- While I expect I'll be able to fix the current unstable behaviour
(occasional copying of topmost path's coords into bottom-most path during difference operations, for too-small paths that "fall through" the quantization grid), the whole requirement for quantization in livarot is a bit unsatisfactory. Longer-term, it might be nice to switch to a path-intersection algorithm without the quantization restriction, and that deals better with degenerate cases - perhaps something like the CGAL 2D intersection methods (http://www.cgal.org/Manual/beta/doc_html/cgal_manual/packages.html#part_VIII... I believe this part of CGAL is GPL licensed, is this an issue? Thoughts?
- I keep coming across code in Inkscape that could be improved with the
RAII pattern (particularly, things like:
{ Thing *t = new Thing(); ... do stuff with t ... delete t; }
When writing new code, I'd much prefer to use smart pointers, e.g.
{ std::unique_ptr<Thing> t(new Thing()); ... do stuff with t ... }
Obviously things like std::unique_ptr and std::shared_ptr require (part of) C++11. I note that parts of inkscape use boost::shared_ptr - is use of boost the way to go in this case, to keep support for older (non-C++11) compilers?
Thanks
Eric
Get 100% visibility into Java/.NET code with AppDynamics Lite! It's a free troubleshooting tool designed for production. Get down to code-level detail for bottlenecks, with <2% overhead. Download for free and get started troubleshooting in minutes. http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clk... _______________________________________________ Inkscape-devel mailing list Inkscape-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-devel