Grasshopper

algorithmic modeling for Rhino

I am working on trimming a voronoi with a circle.  I actually want the reverse of what is showing where I am keeping the skeletal structure not the cells.  I am not even sure if I am doing this the right way.  I would like to control the size of the cells and the offset in order to 3D print a version of this to be cast in precious metal. I am a beginner with grasshopper with no coding experience.   

Any help would be amazing. Maybe just a nudge in the right direction. 

Thanks.

I have just baked it and booleaned it in Rhino in the photo below.  

Views: 3575

Attachments:

Replies to This Discussion

Check this out.  No "solid" operations.

Attachments:

By the way, you'll notice a second circle used to make the outer boundary arbitrarily larger.  That was necessary because offsetting the voronoi curves leaves only half as much as you want at the edge, due to those cells being reconstructed after trimming.

It would be better to do both circles differently, using two GH circles of different radii instead of 'Offset' from the projected circle that was apparently imported from Rhino.

I think this version is better?  No references to Rhino or internalized curves and points.  I can see some anomalies in the fillet here and there...  Faceted instead of smooth curve.  Perhaps the dimensions are just too small?  Odd things happen depending on the 'Seed' value, rectangle size, etc., but they are all easily changed to find something you like.

Attachments:

Wow.  Thanks Joseph.  I am not sure what is happening in the middle there with the dispatch and shatter.  I am guessing it is allowing for the overlap of the circle and the results of the rectangular voronoi.  I was using my Rhino brain and thinking that if I extruded the exterior circle I could boolean difference out the voronoi and select everything on the inside of the circle.  This works so much better and faster.  Thank you so much.  

Just as a side note, and this is probably a newbie question.  When I build definitions in grasshopper they are super slow to process.  Is this because I start with input geometry from Rhino?  If I use grasshopper to generate the objects (such as the circle in the above definition) will it speed things up?

Good morning.  There are so many ways to do this...  I'm not happy about the few(?) anomalies in the extruded fillet curves; re-working it now.  I didn't mean to leave the "Alternate Extrude" group active in the code I posted last night - it was a failed attempt to fix these lofted fillets and should be disabled/deleted.

Dispatch and shatter were used to isolate the edge voronoi cells that were no longer closed after 'Trim with Region'.  The open cells are intersected with the inner circle using 'CCX'; the 'tA' output is used to 'Shatter' the inner circle; the result (two "Arc-like Curves" for each open cell) is sorted by length, the smaller one is chosen and merged/joined with the open cell.  (NOTE: Just now I tried 'Flip Curve' at that point, hoping to fix the fillet that comes later, but the didn't work.)

The "fixed" (trimmed and closed with a segment of the inner circle) outer cells are merged with 'Dispatch A' (the untrimmed cells) before 'Offset' and 'Fillet'.

As to speed, no, importing Rhino data is not the cause.  Are you familiar with the profiler widget?  'File | Preferences | Widgets | Show Profiler widget' - it shows how much time each component takes.  Solid operations (union, difference, intersection) are slow.

I'm re-arranging this code now to 'Offset' and 'Fillet' before 'Trim' to see if that fixes things.

Third time's a charm!  This eliminates the lofted fillet anomalies by doing the offset and fillet first, before trimming with the inner circle and "repairing" the outer cells.

I added an optional 'MD Slider' so the rectangle can be moved around for different effects (interesting!), closer to your Rhino model where they aren't concentric.

Attachments:

Wow.  That optional component is super nice.  

I have noticed in other definitions that utilize the voronoi tool in grasshopper that some of the cells fill.  Is there a reason why this happens or is it just the random combinations of the fillet radius and the offset?  It seems to random where the cells fill and others don't. 

Yeah, tat happens with different combinations of 'Seed' and 'Count' with 'Pop2D', different positions for the surrounding rectangle, different values for offsets, etc.  I don't know why.

Third time's a charm!

"Fourth Time" would be a better 'Fillet', a marble (sphere) rolling between curves and surfaces; smoother corners between trimmed voronoi polylines to segments of 'inner circle' ("Arc-like Curve"s).

So many options now.  Thanks for your help.  

I really have a lot to learn. 


Hi, i'm trying to do something like it. Could you please upload that grasshopper file? Thanks

Instead of 'Fillet', a point on each segment of the Voronoi cells can be used to create periodic interpolated curves.  No problem on the "repaired" edge cells that combine arcs with polylines, though could be improved by scaling the holes smaller - or enforcing a minimum separation without overlap of the curves...

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