用多边形将其轮廓与poly2tri接触的三角剖分? [英] Triangulate a polygon whose contour touches itself with poly2tri?

查看:259
本文介绍了用多边形将其轮廓与poly2tri接触的三角剖分?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以对与poly2tri接触的多边形进行三角剖分(如上图所示)?

Is it possible to triangulate a polygon which touches itself (like in the image above) with poly2tri?

推荐答案

我的解决方案:使用Clipper偏移多边形,对其进行三角剖分,然后重新偏移以获得最终的网格.

My solution: use Clipper to offset the polygon, triangulate it, and re-offset to obtain the final mesh.

当然,这并不是一个总是可行的技巧,因为使多边形偏移可能是一种破坏性的操作(如果多边形上的细小末端,它们可能不会偏移回到其原始位置).

Of course, this is a hack which does not always work since offsetting the polygon is a possibly destructive operation (if the are tiny ends on the polygon, they might not offset back to their original positions).

这篇关于用多边形将其轮廓与poly2tri接触的三角剖分?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆