Grasshopper

algorithmic modeling for Rhino

So I have a definition that is fed a number of inputs by udp at different rates (which I can't change) and I want the main body of calculations to only trigger when say Input A updates.

Data Dams update according to time intervals which doesn't work for me, tricks like misusing Longest List only work for a single input and multiple static variables, and from what I understand scripts will still update (triggering the rest of the definition) when any of its inputs update even if the outputs stay the same.

Any one have any crafty ideas/solutions?

Views: 1702

Replies to This Discussion

You'll have to do a fair bit of hacking because this goes directly against the core process Grasshopper operates by. There are two approaches I might consider fruitful:

  1. Use Visual Studio to create a new GH_Component and specifically override the expiration behaviour of the component, so that the component itself and its downstream objects only expire when a certain input expires, but not when other inputs expire.
  2. Put the other inputs into some dead-end object which may update all the time, and harvest the data inside that object whenever you need it. This means one object depends on another without a specific wire connection between them (could be confusing), and you may run into trouble when the data matching becomes difficult.

Do not know if this will work, but it's an attempt.

Attachments:

Seems to be working! :)
Added an input to Receiver to act as the trigger instead to suit my use-case.
With 'Send' set to always true, so long as nothing updates downstream of the receiver, this seems to work perfectly.
It doesn't seem to know how to deal with data trees but so long as it doesn't confuse the order of items that's easily worked around.

Just wondering, might be a stupid question, but Receiver can't fire off before Sender runs right? even if there were computationally heavy stuff in-between Output A and Sender or something?

Anyways, thanks for this either way :D

Attachments:

Hm, this was working perfectly, except sometimes the Receiver breaks, refusing to properly output the values, deleting and replacing it seems to work so far though.

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service