Medial Axes

I've just made a short post on my blog about medial axes.

Here is the definition file:MedialAxis.ghx
  • Evan C

    Daniel, this is very helpful... I'm been trying to modify your definition to work on sets of curves with interior 'islands' ... I'm having some luck, but the data structure is throwing me off.


    this is essential what I'm trying to accomplish.


    and this is what I've got so far.... so you can see, the problem is in the very last step - structuring the boolean pattern to remove the irrelevant curves....

    do you have any ideas? see attached ghx.MedialAxis-mod.ghx
  • Daniel Piker

    That would be a really nice development of the definition. Afraid I'm too busy to help now, but good luck!
  • Evan C

    got it!

    It's a little slow, but it works.


    100413-MedialAxis-Islands.ghx
  • GregA

    Hi Guys,

    I think I must be missing something. I try to run the file by inputting a regular 2d polyline, however the Axes isn't generated. Instead all I get is a perpendicular line to the right. 

    Any help would be great.

     

     

  • trevor.patt

    GregA: the Curve|Curve Intersection has changed since that file was created, when no intersection occurs no branch is created either, meaning the Null component no longer finds the nonintersecting curves and the Boolean pattern doesn't match the data structure of the curves it is supposed to be culling.

    I made this into a VB.NET script here. Hope it helps.

  • GregA

    Cheers Trevor,

    I thought it must have been due to an upgrade.

    Hey, thanks also for the link to your revision of Daniels file via VB script. It's just a shame that it doesn't allow for hole punching like the image below by Evan.

  • trevor.patt

    Added a new link at the bottom of the blogpost.

    Note: the script allows a mixture of curves with various number of holes as you can see in the image, however it does not calculate the interior islands, you have to match their datapath to the path of the respective boundary curve before inputting that information to the script. Also, it seems to have trouble with certain slider settings. I haven't determined why this is.

     

  • Christos Antonopoulos

    Hello Daniel,

    Thank you very much for this, even if old.

    Any idea on how to implement this logic on a given 3d Mesh?

    I have started a discussion here

    http://www.grasshopper3d.com/forum/topics/skeleton-frame-of-a-given...

    and I believe Arthur was trying to find out too here

    http://www.grasshopper3d.com/forum/topics/code-to-extract-center-cu...

    Any help very much appreciated.

    Best,

    Christos