Grasshopper

algorithmic modeling for Rhino

Hi all, say I have a straight line 24" long and I would like to subdivide it using parameters. For example, I want 4 divisions and would like to set the top one at 6", the second at 8" , the 3rd at 8". I would end up with domains of 0-6, 6-8, 8-16, 16- 24. Is there a simple way to do this besides using divide and moving the points around after?

thanks!

Views: 1480

Replies to This Discussion

Hi WoodDuck,

Do you want to just apply a certain number of points on your straight line, or explode it into a couple of lines, based on those domain distances?
Try using the attached definition for both issues:

Attachments:

Hi Djordje, I want to explode it into separate lines, then use the endpoints to create rectangles that stack on top of each other.  I'm away from my computer til tomorrow and will try it then.

Thanks so much - it looks simple and elegant. My own version.. not so much,

cheers..

Ok.
I made a mistake - you could use the curve's length as input too.

Attachments:

even better.

One thing:  do you think I could use 4 sliders for inputting the line segment sizes? I want them to be a particular order so that the top segment is "x" and the second one down is "y", etc.

thanks again

Yes, it is possible. But try using 'Gene pool' instead of Sliders. With sliders you will have to add new ones and plug them, if you would like to increase the number of sub-domain divisions. With Gene pool you just need to right click on it, select "Edit" and change the "Gene Count" to what ever number of sub-domain divisions you like:

Attachments:

I guess I've been out of it for a while - I hadn't heard of this. Perfect for what I need.. thanks again.

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