Polyline offset with closed polygon and islands

泪湿孤枕 提交于 2019-12-11 00:42:29

问题


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.

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).

Screenshot 1

now I need to refine it to handle corners (joins) correctly. but have no idea how to do it.

Desired result: Screenshot 2


回答1:


See here for one method of offsetting a polygon using it's skeleton (which is what you are trying to do here).



来源:https://stackoverflow.com/questions/845254/polyline-offset-with-closed-polygon-and-islands

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