Library for polygon operations [closed]

[亡魂溺海] 提交于 2019-11-30 05:40:54

Clipper is an open source freeware polygon clipping library (written in Delphi and C++)^ that does exactly what you're asking (except for triangulation) - http://sourceforge.net/projects/polyclipping/

In my testing, Clipper is both significantly faster and far less prone to error than GPC (see more detailed comparisons here - http://www.angusj.com/delphi/clipper.php#features).

Re: Anti-grain Geometry (AGG) graphics library - it doesn't do polygon clipping, but simply uses GPC (which isn't free for commercial applications). However, Clipper does have AGG units to make clipping in AGG just as easy as GPC.

^ Edit: Clipper is now written in C# too (together with Perl, Ruby, Haskell and Flash modules written by third-parties).

AKU

PolygonLib is a new polygon clipping library written in С++ and already used in two projects. It is numerically robust, uses double coordinates, and is optimized for polygons with large numbers of vertices. See http://www.ulybin.de/products/polygonlib.php?lang=en for more details and comparison of performance and memory utilization with GPC and PolyBoolean.

The restricted evaluation version of the library is free for not commercial use and supports the operations you need (except for triangulation).

How about boost? http://www.boost.org/doc/libs/1_47_0/libs/polygon/doc/index.htm

If you're fine with the heavy use of generics in the interface, I suspect this will serve your purposes well. I'm not sure if it contains triangulation, but you can implement one of the many available triangulation algorithms if it does not.

Check out Liszt a Scala DSL

http://www.antigrain.com/license/index.html is the closest I can find, you may have to spend a buck if it does go commercial, but you can use it for free for now, and get consent later on.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!