折线抵消闭合的多边形和岛屿 [英] Polyline offset with closed polygon and islands
问题描述
予有未分类的组线段没有任何彼此结合。每行描述2点(X,Y)。我可以搜索具有相同的点的线,这意味着它们应当连接
I have unsorted set of line segments without any binding to each other. Each line described with 2 points (x,y). I can search for lines with the same points, which means they should be connected.
每一行的厚度属性。我需要抵消这一厚度每条路径,并创造4点说明最后plygon(每行)。
Every line have a thickness attribute. I need to offset each path by this thickness, and create 4 points describing the final plygon (for each line).
现在我需要加以改进,以正确处理弯道(连接)。但不知道该怎么做。
now I need to refine it to handle corners (joins) correctly. but have no idea how to do it.
期望的结果:截图2
推荐答案
请参阅<一href="http://www.cgal.org/Manual/3.2/doc%5Fhtml/cgal%5Fmanual/Straight%5Fskeleton%5F2/Chapter%5Fmain.html"相对=nofollow>这里使用它的骨架(这是您想在这里做什么)抵消多边形的一种方法。
See here for one method of offsetting a polygon using it's skeleton (which is what you are trying to do here).
这篇关于折线抵消闭合的多边形和岛屿的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!