Grasshopper

algorithmic modeling for Rhino

If I have a weave component and I have a null input to one of the input points and something valid to the other, it errors out, even if the weave pattern only asks for the other input (i.e. all 0's or 1's).  I know this is odd, but I'm trying to weave one stream back together that had to be split into two (open or closed curves) in order to be processed separately.  If I just throw the two streams together with Merge, the output order no longer matches the input order.  I might have had open-open-closed-closed-open as input order, I get open-open-open-closed-closed back out.

So I'm trying to weave the output back together in the right order using the closed/open pattern gotten earlier as a mask.

This actually works fine when there are both open and closed curves, but it fails if there are only open or only closed as the weave component no longer works... 

The Pick and choose component (similar function) does work with only one input...  but it doesn't weave the stream back in the right order.  Maybe there's some other way to do this...  :-(

Thx, --Mitch

Views: 970

Attachments:

Replies to This Discussion

I haven't used it, but I'm pretty sure that this sort of thing is exactly what the sift and combine components were meant for.  They're meant to be used in tandem...so you sift out data with an index pattern (each stream gets null placeholders for all other indices), perform whatever operation you want on each stream, and then combine them back together.

Ahh, OK, I've never used those before either but it sounds right, I will try tomorrow when I'm less fried...  thanks!

--Mitch

OK, thanks very much, the Sift component seems to be exactly what I need...  Now it's working like it's supposed to.  OTOH, the Combine component didn't work the way I thought it should to put things back together.  However, as the Sift component kept the branch numbering correct, using a normal Merge component put everything back together in the right order.

Cheers, --Mitch

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service