Grasshopper

algorithmic modeling for Rhino

I am trying to take any given surface and automatically orient and scale a cylinder (or a different select brep) along the surface. The oriented breps should be scaled so that they touch or nearly touch and there is no left over space between the last object and first object (when the surface is continuous).

I'll attach files so this makes more sense. In the 3dm file, I have added a sample surface and also did some layout of the objects on the surface (I did this the old fashion way/ by hand).

Any ideas of how to make this work?

Overview of what I have done so far --
1. Select Surface
2. Divide Surface into proportional sub-surfaces. Use slider to get as close to 1.0 as possible. This could probably be automated to select the correct division automatically. I did not know how to do this.
3. Get the midpoint of each sub surface.

Thank you!
Walt

Views: 9127

Attachments:

Replies to This Discussion

Hi Walter,

What about something like this:


It follows the logic of your hand made example, but as you can see parts of the cylinders fall outside of the base surface's domain.

If you'd like them to obey the boundary then you should perhaps consider a different approach, maybe using packing spheres/circles on the surface? I don't know, just a thought.

This will propably get a bit harder with custom breps bacause of the lack of symmetry.

Good luck,
JJ
Attachments:
Well there's a simple solution to the problem, unfortunately I'm sitting at a machine with an ancient version of GH (pre datatrees) so my definition isn't tidy and won't be of much help, but his is how you do it:

1. Divide surface (didn't repeat the proportional solution)
2. Explode
3. find surface center normal [Evaluate Surface(reparameterize, point (0.5, 0.5, 0))]
4. Offset corner points (V) +/- whatever distance you want along the normal in [3].
5. Create a twisted cornerbox from the two sets of offset corner points
6. Create a Box around any choosen BRep
7. do a Box Morph on the selected Brep from the box in 6. to the TBox from 5.
8. Tada!

Oh and if the base surface is proportional to the base box the end result wont get warped like in my picture.


Attachments:

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service