Grasshopper

algorithmic modeling for Rhino

In the process of upgrading some large definitions to 0.9.   So far, so good, I've only had to make a few modifications to path mappers here and there, as well as some reworking of some Stream Filter structures.  

However, I've run up against a problem that is significantly more work to fix... it seems that the behaviour of the List item replace component has changed.  I used to rely on the fact that if you pass an empty list of index items in any particular branch, that branch would come out the other side unmolested.  Unfortunately, the new behaviour seems to be that an empty list of index items causes the entire branch to disappear... very unfortunate, and difficult to reconstruct differently.

Is there some logic that I'm missing here?  I'm having to do a whole lot of work to fix these portions and I don't see the benefit of the new behaviour.

Thanks,

Marc

Views: 2348

Replies to This Discussion

Looking into it.

--

David Rutten

david@mcneel.com

Poprad, Slovakia

I think the new behaviour is simply a side-effect of new data-matching logic. The code for [List Replace] certainly hasn't been touched in a long time. Can you post a file that shows the difference between what you expect to get and what you really get?

--

David Rutten

david@mcneel.com

Poprad, Slovakia

Just opened an old definition and had the same problem.

The panel in the middle shows the indices to replace, the panel on the right shows what's left after replacing...

Attachments:

I'm getting similar strange behaviour. When no item indicies are supplied, the return list is empty. I would assume the logic to be: if no item indicies are supplied, the list remains unaffected.

I can get around it with some grafting and shift-path/path mapper trickery but it's still strange

Olivier wished for this a couple of days ago and I made it so that the Indices input can be empty. It used to be a required input which meant the component didn't even run if you supplied no indices.

--

David Rutten

david@mcneel.com

Poprad, Slovakia

It just seems a strange behaviour, since only the specified items from the index list are replaced - it would be more logical if no indecies are specified, the list remains unaltered, rather than empty; see images for examples. (first is normal, second is empty-list behaviour)

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