Grasshopper

algorithmic modeling for Rhino

Enticed by an old thread featuring a way to derive the medial axis of closed outlines by Daniel Piker:

http://www.grasshopper3d.com/profiles/blogs/medial-axes

I set about understanding his script and after tweaking it, started playing around with raising the medial axis points according to their distance from the outer edge and then played with frustrating data tree dilemmas as to how to get it to loft or patch a surface onto each of these sets of curves and height raised axes independently, but then realized I could just patch the entire bounding box of various objects all at once.

Starting with surfaces with optional holes:

It can make ArtCAM or RhinoEmboss type puffing surfaces, as single trimmed NURBS surfaces:

I used two offset curves out from each edge to help mellow out a patch surface and guide it to be plump but not too steep, with the offset curves set down below the plane too, the outer one more than the first one. I then included the bounding rectangle too to make it much better behaved still, also a bit below the construction plane for a clean cut later to isolate the hills. When I do split it with a ground plane I get objects that can be capped into solids in Rhino.

The main setting are the resolution and stiffness of the patch component.

Zebra is happy enough:

The initial determination of the medial axis is done by creating points along each curve, making a Voronoi diagram within an ample bounding box, then exploding all cells into lines and cleaning up to keep only those fully contained on a surface.

The Voronoi diagram gives the medial axis since the cells refuse to overlap each other so they finally crash into each other and form new border lines between them.

Views: 18727

Replies to This Discussion

Hello,Nick 

is that definition just for surface?

How can I use voronoi to be puffing?

Much more robust version with data tree output from the Python offset script and a better way to search for mounds versus backgrounds that works on hole pieces. I broke much of the generality with the last version that added Python offsets.

Attachments:

I am trying to apply Nik Willmores  early medial puffing script to a youth baseball team logo.

at present time- the Data tree component is sending no information. If I skip the 'simplify tree data, I do get a some lines, but not a solid line like your example.

Here is my goal - I will be using this line to CNC route  wood with a vcarve bit- If the offset can be similar to your example, then the deeper the offset is, the wider the carving, and thus the best match for my, or any, text/logo.

Is it my geometry, or some missing component (or version) that is causing my challenge?

Thanks in advance!

Attachments:

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service