Grasshopper

algorithmic modeling for Rhino

Hi all,

I'm working on an automated method of mdoelling the total field of allowable deviations for large steel structures and it's working really well. (lots and lots and lots of variables tho!)

I am however having a problem with something simple - limiting a set of values between a fixed set that I need help with please?

For example, I'd like to transform this list . . .

(2, 16, 4, 65, 12, 41, 7, 1, 22)

into this one . . .

(5, 16, 5, 25, 12, 25, 7, 5, 22)

i.e. selecting all numbers below 5 and changing them to 5 and selecting all numbers above 25 and changing them to 25.

I know it's possible with a simple If, Not, Then series but I'm rubbish at code!

Also, is there a simple way to apply dimensions to rhino objects from within GH?

Thanks for your help!

Cheers

James

Views: 332

Replies to This Discussion

First question - you could do it in this way:

Second question: no simple way for now, as far as I know.
Thanks a lot Giulio! Time for me to learn more functions . . .

Also time to figure out how to apply dimensions from within GH!

Thanks

James

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service