Grasshopper

algorithmic modeling for Rhino

Packing circles of fixed radii within a boundary?

Hi all,

I've found a handful of threads that describe how to either:

1) Pack circles of fixed radii so they're tangent but aren't contained within a boundary

2) Pack circles of varying radii within a boundary so they're actually tangent

OR

3) Pack circles of fixed radii within a boundary so they're nearby, but not actually tangent

However, for my purposes I need a definition that allows me to set discrete radii, pack circles that are actually tangent AND have all the circles contained by a boundary.

Using Kangaroo like in this example has gotten me closest to my goal, but I still haven't been able to constrain the circles to any boundary:

http://www.grasshopper3d.com/forum/topics/circle-packing-in-grassho...

Here's the slight adaptation of the definition explained by the link above that I'm working with:

Circle%20Packing%20Kangaroo.gh

I'd like the rectangle grouped at the beginning of the definition to act as a container for all the packed circles.

Any help anyone's willing to offer would be hugely appreciated- thanks in advance!

Views: 1759

Attachments:

Reply to This

Replies to This Discussion

Thanks for the advice Hyungsoo, that thread does seem relevant, but when I associate the mesh parameter with my rectangle the SphereCurveCollide parameter produces the error:

1. Error (CS1705): Assembly 'KangarooSolver, Version=2.1.3.0, Culture=neutral, PublicKeyToken=null' uses 'RhinoCommon, Version=5.1.30000.13, Culture=neutral, PublicKeyToken=552281e97c755530' which has a higher version than referenced assembly 'RhinoCommon, Version=5.1.30000.9, Culture=neutral, PublicKeyToken=552281e97c755530'

This may be related to what Daniel's said about how it "uses a custom goal, so you'll need to update the referenced assembly location when you open it." Sadly I'm new enough to grasshopper as to have no idea how to do this. Any chance you care to explain?

It's also still somewhat unclear to me how I can adapt this definition to use only a set of fixed radii. I tried replacing the domain with a panel listing the values, but again received an error.

This may help (or not).

Kangaroo 2 needed.

PS: Hold ALT and drag circles with left mouse button if needed

Attachments:

Wow! Thanks a million- at first glance this seems perfect. The 'grab' functionality is especially exciting. I'm looking forward to deciphering the logic.

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

© 2019   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service