Script to clean up polylines with overlapping vertices and line segments
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have a process in which I clean up polyline shapes by exploding them, running Overkill, joining them again, running Overkill again, and then checking that the shapes are closed.
Often I will find that the original shapes have been rejoined in open segments because end points are not perfectly on top of each other. When that happens I have to painstakingly check every segment end by zooming in on it and attach it to the next closest point before joining it all again.
I've attached the beginnings of my code, which is essentially trying to automate what I just described.
The goal is to wind up with a set of closed polyline shapes with no overlapping line segments or overlapping vertices, without noticeably changing the original shape.
Currently I'm unsure if Overkill is running for the whole selection. I am certain that Join is only working for one object in the selection set, and that needs to be fixed. I am aware of PEDIT but I have not gotten that to work either.