且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

多边形运算库

更新时间:2022-12-18 09:59:17

Clipper是一个开源免费软件多边形裁剪库(用Delphi和C ++编写)^,它完全可以满足您的要求(除三角剖分外)- http://sourceforge.net/projects/polyclipping/

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/

在我的测试中,Clipper比GPC快得多,而且出错的可能性也要低得多(请参阅此处的详细比较- http://www.angusj.com/delphi/clipper.php#features ).

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:反晶粒几何(AGG)图形库-它不进行多边形裁剪,而只是使用GPC(对于商业应用程序来说不是免费的).但是,Clipper确实具有AGG单元,可以像在GPC中一样容易地在AGG中进行剪切.

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.

^Clipper现在也用C#编写(以及第三方编写的Perl,Ruby,Haskell和Flash模块).

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