Grasshopper

algorithmic modeling for Rhino

Im having trouble figuring out how to do this without breaking the numbers in the bottom list up in to a number of sub domains and testing the upper list against each on individually.... doing it all at once would be super helpful

Views: 6171

Replies to This Discussion

If you plug the numbers into an "Integer" component from the Params>Primitive tab. If you want to round up, just add the number .5 to your numbers.

Hi Tim,

You should take a look ar the Round component. As well as the Normal rounding where it takes it to te closest integer there is also a Floor (round down) and a Ceiling (up) output.

Haha, never knew about this. Much cleaner. Thanks!

Hi Thomas,

The component Find Similar member is the nearest solution. You may then heve to do some checking with the next item to see if it is a better match.

The Ceiling function in the expression language is made for this. You can either use an Expression component or put an expression into a number parameter:

--

David Rutten

david@mcneel.com

Unfortunately, this does not work here. Do you have any clue why (see below)? I tried with Ceiling(Num), but the results are then all 1.

If I used the expression component, what would be the expression to round to 3 decimals (=mm)?

Thanks in advance for all hints.

Andreas

Ceiling(Num) works for the number component as well as Ceiling(X) for the Expression component.

Ceiling(Num) works for the number component as well as Ceiling(X) for the Expression component.

I ended up solving my specific problem in an inelegant way... but it works for what I need. I ended up operating on each branch individually and then entwining them back together in the end.

Attachments:

Hi Thomas,

Sorry I wasn't around yesterday to post a solution. Here is the method I described above using the [Find Similar Member] component.

Note there appears to be a bug in the component when looking for small numbers so I multiplied it all by 100 and then back again after the [FSM] to get it to work.

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service