2D polygon operations library licence problem

AlexR
2011-12-29
2013-03-08
  • AlexR

    AlexR - 2011-12-29

    Hi guys

    I have just been scouring the FAQ and i came across this:

    Why can't the pocketing algorithm handle simple holes/islands?

    "Sadly both major libraries offering 2D polygon operations (CGAL and GPC) are distributed under GPL-incompatible licenses. It is a real pity (and a huge waste of development resources) that their authors prefer to distinguish between commercial and non-commercial use, which makes this software unsuitable for any Free Software. If you know of any GPL-compatible library for polygon handling (ideally with bindings for Python) then just drop us a mail!"

    OK…. most of use use InkScape or blender and they both have boolean operations (2D polygon operations) and as far as I know Inkscape and blender are both open source software.

    So question for the developers of pycam. Could you raid their libraries or code and use/modify them?

    Just asking…..?

    alexr

     
  • Lars

    Lars - 2012-01-03

    Hi alexr,

    I took a short look at the build requirements of Inkscape and I did not see a suitable geometry library in the list. Digging into the code will probably reveal custom code that usually works. But this would involve a port of this code from C++ to Python. Additionally the offsetting problem is not trivial enough, that Inkscape's (or Blender's) code could be considered to be final. Thus it will require maintenance …
    To put it simply: I am a bit tired of trying to adapt or write non-trivial polygon-related code. Currently I am in the mood to just wait for a suitable library to pop up. This would solve the problem.

    Recently I stumbled upon Clipper: http://www.angusj.com/delphi/clipper.php
    The license is ok - but the packaging is really cumbersome.
    Here someone ("alexrj" - but that's not you - or?) wrote Perl bindings for clipper: https://github.com/alexrj/Math-Clipper.
    Maybe I will find the time during the next months to write Python bindings as well. Then we will have the Clipper library in PyCAM - which should solve all of these problems.
    Or would someone else like to pick up this task? This would be awesome!

    cheers,
    Lars

     
  • Angus Johnson

    Angus Johnson - 2012-01-22

    The license is ok - but the packaging is really cumbersome.

    I'm wondering why you consider the packaging 'cumbersome'? How would you like it packaged?
    Angus (author of Clipper)

     
  • Lars

    Lars - 2012-01-22

    Hi Angus,

    thanks a lot for joining this discussion!

    I hope that you didn't consider my wording as too offensive - I was just surprised that I did not manage to compile the library within a few minutes :)
    Taking a quick look at it, I was missing the following things:
    - a README/INSTALL file describing the build process
    - a Makefile (or any other build file format)
    - maybe a header file

    But I am not a real expert in C/C++ - thus I don't really know the common ways of distribution. I am more or less just used to the ./configure-make-cycle …

    btw: is there a kind of "reference" implementation of clipper in any language? Or do you try to keep all ports (C++/C#/Delphi) in sync?

    Anyway: your library looks very promising and seems to be full of features!

    cheers,
    Lars

     
  • Angus Johnson

    Angus Johnson - 2012-01-22

    Hi Lars.
    No, I really didn't find your wording offensive, and I'm very conscious of just how easy it is to misinterpret the emotional tone of online posts. So no worries there :).
    I'm no C/C++ expert either. In fact, this library is my first foray into C/C++ and I'm still not up to speed on Makefiles hence that deficiency. Anyhow, I'm open to suggestions/help on rectifying that too :).

     
  • kishchak

    kishchak - 2012-11-13

    See the PolygonLib - Polygon Clipping Library.

     
  • kishchak

    kishchak - 2012-11-13

    See the PolygonLib - Polygon Clipping Library.

     
  • Lars

    Lars - 2012-11-13

    Hi kishchak,

    thanks for your comment, but PolygonLib does not seem to be available under a libre software licence. Thus it cannot be used by PyCAM.

    But there was a change from another direction: the CGAL library recently switched their licence to the GPL. Thus this will probably be the library of choice for PyCAM (as soon as someone starts to work on it).

    Cheers,
    Lars

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks