Sorting medial axis curve

Is there an efficient way to sort these lines into clean polylines?

I get clean result from the medial axis, but I’m looking for good ideas on how to sort them efficiently. Currently I’m using the surface extrior outline to sort the points, but this tends to generate “dirty” intersections.

Medial axis results - small line segments.

Curve sorting results - continuous polyline, but confusion in the intersections.



Medial axis.gh (40.4 KB)

Is there an efficient way to identify these intersections?

Hi
When you explode Voronoi you need to cull duplicate lines.
After that use join and remove the short curves then use Multiple curves intersection

Medial axis.gh (73.9 KB)

1 Like

Thanks @seghierkhaled
I hadn’t realised the need to cull dups! This is the result I was after - clean curves.
Turned out to be a simpler solution than I thought.

You can get the line endpoints and count their occurence, which gives you the node valence:

That’s the method I used for the work presented in this paper, which also includes a few more post-processing methods for reducing the medial axis:

1 Like