Grasshopper

algorithmic modeling for Rhino

Hi !

I am using the "Replace" component to prevent some values in a list from being zero.

The problem is that if no values in the list are zero, no replacement index is inherited and the "Replace" component will output nothing at all instead of just leaving the list as it is.

Is that the way "Replace" is supposed to (not) work ?

If so, it makes it very rigid...

Views: 473

Replies to This Discussion

you can use "Clean Tree" to remove invalid entries

Raul,

In my mind, no entry in the "i" parameter of "Replace" is not invalid.
It just means that "Replace" should just not replace any index of the input list.

In short : if "i" is null, the output of "Replace" should be the same I the input.

Instead, it just decides to crap out the whole input list.

I find this un-elegant because it forces me to stack up a whole bunch of components to get this function to work as expected.

I changed it so that the Index input is now optional. Should work better in the future.

--

David Rutten

david@mcneel.com

Poprad, Slovakia

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