Hi, Guys, if u have time, could u please help me with one issue. There r polygons that were offset and I need to merge all overlapping lines to a single line but I could not do it for several days… please, I need a hint. THANKS! these r files for understanding what I need exactly:
offset lines to single curves attempt.gh (8.6 KB)
[David R: I edited this post so the file was attached directly. I also internalised the referenced curves from Rhino so the 3dm file isn’t needed. Items 3 and 4 from this list.]
So in this case here, are you looking to get individual lines (A, B, C, …, H), or are B, C and F supposed to be a single line segment?
Hi, David, thanks for editing my post it is really great and Yes I need that (A, B, C…H) lines be individual lines cuz I need separate outer edge in future =)
You could use this line network cleanup tool:
(install the gha first)
cleanup_curves.gh (10.9 KB)
Topologizer.gha (19 KB)
Original post about this:
In addition to @DanielPiker’s solution, here’s one that only requires the Kangaroo Remove Duplicate Lines components (which is part of the standard GH in Rhino6 toolset): individual lines.gh (21.3 KB)
My idea was:
- Cleanup all offset curves, so there’s no polyline vertices in the middle of straight segments.
- Get all the corners from all offset curves.
- Remove the duplicates from these points.
- Project all the remaining corner points onto all the offset curves.
- Remove those projections that were further than x away from the base curve. You now have for each offset curve the parameters where all coincident points are.
- Shatter at the remaining parameters. You now have the individual line segments, although on the inside they will be duplicated.
- Use the Remove Duplicate Lines component to get rid of those.
There is a problem with your offset where a tiny bit of polyline loops back upon itself. This is messing with the logic somewhat.
I’ve made all these steps before and missed “discontunity” , because of these nothing worked… THANK U, DANIEL!!! =D =D =D
THANK U, DAVID!!! U R REALLY THE BEST FORUM =) near future I will falling in love with the Rhino, and one of the reason is u guys!!! thank u very much…
It would appear that this tool is exactly what I have been looking for to clean up some messy IGES imports. Unfortunately Topologizer is failing curve to line. Any thoughts?
CurveToLineFail-01.3dm (120.2 KB)
This component only works with line inputs, and in Grasshopper you can have objects which are geometrically lines, but still of type curve, not line. To convert them you can create a line joining the end points:
Thanks David, that really solved the issue for me !
You can use this
offset lines sol.gh (7.9 KB)
Thanks for ur reply! it works for this case, but unfortunatly this solution is not universal.(
There is another solution for another case when the curves intersect
if be honest I found the way which makes it work for me Universaly, but I am interested in your solution… =) maybe ur solution is shorter
Share an example to test it