mkazhdan / PoissonRecon

Poisson Surface Reconstruction
MIT License
1.55k stars 424 forks source link

PLY code is not GPL compatible #143

Open rpavlik opened 4 years ago

rpavlik commented 4 years ago

The license for the original 1994/1998 Greg Turk "PLY" code is nonstandard (does not meet the Debian Free Software Guidelines nor the Open Source Definition): it is similar to a standard ISC license but adds the restriction "[provided] that you do not sell the software."

The license is seen in:

This might not be an issue in non-commercial use of your software on its own: it won't get packaged or distributed with open source software, etc. but this additional restriction isn't incompatible with your MIT license on your other code. However, this additional restriction does affect anyone incorporating this code into their own project: if they're using GPL code, this is incompatible, and the overall "do not sell" restriction carries (which is not clearly documented in the README, perhaps wasn't even realized until now).

I figured this out when reporting https://github.com/cnr-isti-vclab/meshlab/issues/583 where they use your code to provide a reconstruction algorithm plugin for MeshLab (for which purpose it works very well!). Unfortunately, the resulting binary might be considered non-distributable because of this license incompatibility: the GPL does not permit additional restrictions on use.

It looks like a substantial chunk of this code may be your own and original (the C++ code), and thus you might be able to relicense it. For actual interaction with PLY files, see that meshlab issue I filed: there is an MIT-licensed PLY file library called "RPLY" that you might consider switching to for uniform licensing of your entire software.

It does look like the downstream project "geogram" has ported your source to RPLY - you might consider backporting those changes if they're compatible: see this file which is related to your Ply.h https://github.com/alicevision/geogram/blob/master/src/lib/geogram/third_party/PoissonRecon/PlyVertexMini.h

Obligatory disclaimer: I am not a lawyer, this is not legal advice.

rpavlik commented 4 years ago

Here's the geogram release where they stopped using the ply sources: https://github.com/alicevision/geogram/commit/4a55fcc041a398f337fbc536ac7aab9c176cebf0#diff-88fbbe0622ebd91b10884aaa0935fc4c

rpavlik commented 4 years ago

So I was able to solve this for Meshlab by porting the changes from geogram: https://github.com/cnr-isti-vclab/meshlab/pull/587

Those changes are:

starseeker commented 3 years ago

Looking at the newer versions of this code, it looks as if the Ply types are more deeply embedded.

What would be a good/acceptable patch to try and correct this issue from the upstream perspective? It looks like it would be a fair bit of work to replace the "internal" use of the Ply types, so it would be nice to have some idea what directions could be pursued with a reasonable chance of getting them merged upstream...

mkazhdan commented 3 years ago

We have recently spoken to Greg Turk who has generously agreed to change the license on his PLY code to BSD. We have updated our repo (Version 13.70) to use that code. Hopefully that should resolve the issues.