Grasshopper

algorithmic modeling for Rhino

Hi everyone, 

So I have this closed curve and thanks to a large number of definition available in this forum i got the medial axis of this closed curve. 

What i am trying to achieve is extract only the middle part of this skeleton. 
I've tried many ways to do it with lists mainly but with no success. 

Here is an image that illustrates what i want. 


The line in the yellow curve is what i want to extract. 

Is there a solution to do this with any kind of closed boundary? 

Thanks. 

Views: 1574

Attachments:

Replies to This Discussion

I describe a couple of methods for going problems of reducing medial axis transforms in this paper that might help, specifically this bit:

"By subsequently identifying points in which the remaining Voronoi line-segments connect in a node with a valence >= 3, we can construct a MA suitable for graph analysis by joining the linesegments into polylines which connect at these branching points"

Pretty much all these topological operations rely on identifying branching nodes (i.e. where more than three points overlap), through nodes (i.e. where two points overlap) and outer nodes (i.e. where only one point exist). With this information you can start sorting, joining and culling the edges. A large part in this is tolerance in terms of when two points should be considered the same. I wrote all this in GHPython, but think you should be able to do it with sets etc in standard GH.

Hope that helps..

A simple, to simple?, solution could be to calculate the distance from th middle of each lines from the closed curve and to select the farthest!

Hi,

just a naive approach. Maybe it helps some how...

Attachments:

Thank you all for your time and help. 
Thanks to you I've found a pretty good solution that work fine in lots of different situation. 
Here's the definition for other people who may have the same issue. 

Attachments:

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service