Grasshopper

algorithmic modeling for Rhino

Hi All,

I've got a funnel shaped solid that needs to be populated with cubes - perpendicular to the world XY plane.

I've divided the surface into regular contours as per the cube size. Then divided the contours by length ( attached file for reference).

However, rather than a fixed length of 300mm, I'd like to divide each contour into equal lengths with a minimum length of 300mm: this is to avoid left over lengths/ last length of the divisions being much larger than 300mm- as seen in attached file. These lengths can differ from one contour to another, however, on one contour-all divisions need to be equal.please guide on what would be the best way of going about this?

Next, I need to populate the funnel with cubes (cube is alongside the funnel- same file).

However, I'd like to place the centroid of the cube on each of the points on the contour, keeping in mind that the cube must be perpendicular to the world XY plane.

Again, please guide on the best way to proceed, considering I'm quite new to the language

Many Thanks!

Neha

Views: 1509

Attachments:

Replies to This Discussion

Hello Neha,

Here's how I would do it.

Divide the lenght of each contour by the size of your cube, and round it to the integer below. That gives you the number of cubes you can place on each contour.

Then divide each contour with that number, you'll obtain equal lenght segments.

To place your cubes on your points, you can use the orient component. It usually uses planes for orientation, but if you provide just a point GH will assume it's the World XYplane centered on that point.

Good luck!

Attachments:

Thanks FRiou!

This was really helpful!

The round off to lower command and dividing accordingly was something I couldn't understand earlier.

For the orientation, I was able to achieve the require geometry by using HFrames and domain box as well.

Attaching below for view

Thanks again :)

Attachments:

You might want to look at some code and comments I posted on this thread recently:

http://www.grasshopper3d.com/forum/topics/brick-wall-bricks-interse...

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service