合并重叠的三角形变成多边形角形、多边形

2023-09-11 03:51:49 作者:不如平凡

我有一堆从三维模型投影到二维平面重叠的三角形。我需要合并触及三角形变成一个封闭的,非凸多边形的每个岛。

I've got a bunch of overlapping triangles from a 3D model projected into a 2D plane. I need to merge each island of touching triangles into a closed, non-convex polygon.

将所得的多边形不应该在他们的任何孔(由于源数据没有)。

The resultant polygons shouldn't have any holes in them (since the source data doesn't).

在源数据的其他许多三角形的来源三角形份额(浮点相同)的边缘。

Many of the source triangles share (floating point identical) edges with other triangles in the source data.

什么是做到这一点的最简单的方法是什么?性能没有特别的重要,因为这将在设计时进行。

What's the easiest way to do this? Performance isn't particularly important, since this will be done at design time.

推荐答案

尝试的 GPC ,或一般多边形快船库。

Try gpc, or the General Polygon Clipper Library.