Grasshopper

algorithmic modeling for Rhino

Hi,

I have few rectangles made with "Rectanlge 2Pt" component from the list.I would like to move them from point 0,0,0 with let's say 5 units distance beetween each of them.

I took lenghts o longest segment from them and have a list.

So if understand it - it should always be a addition of all items from list until each rectangle lenght:

second rectangle position: RectangleSegmentLenght1 + distance

third: RectangleSegmentLenght1 + distance + RectangleSegmentLenght2 + distance + RectangleSegmentLenght3 + distance

fourth: RectangleSegmentLenght1 + distance + RectangleSegmentLenght2 + distance + RectangleSegmentLenght3 + distance

and so on...

How can i do that?

Views: 931

Replies to This Discussion


I
f you want to move them on X axis, can use only the first panel of X coord. The fact is you need for i item the sum of all previos values at i item, that is, for item(0) = 0, for item(1) = 0 + 1, for item(2) = 0 +1+2, for item(3) = 0+1+2+3... Using Series you can do it, and add a value for the custom separation. 

Attachments:

that's  exactly what I wanted to do. Thank you very much.

Hi,

Still i can't figure out the one thing. I get error at first and secong point on the list - rectangles stick each other. I guess I should use some component from the tree menu to shift a list to start the values from {0}, but maybe thats something else is wrong ?

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