Pointers about chained conditioned selections

Hallo All!
I´m working on a definition for my thesis research and would appreciate any guidance/help as what and how to construct it.
I´m working with a complex set of geometries. Each has key-value dictionaries attached to them. I think it is not a common procedure in #grasshopper but it is done through the #Topologic plugin and its´s actually very helpful.
I can query the values from certain keys and with them using sets, match text, and such, performe booleans to retrieve subsets of the topologies and operate further.
The question is if any of you had some pointers on how to do several parallel/chained of these boolean selections efficiently, fast, and easy. I´ve achieved it the hard way and it works but the management is really complex and hard.

Any ideas? Thanks in advance!

Boolean operatorions over Sets using ghPython are easy, with helper classes for paralelization if your lógic happens to be paralelizable.
Also recursive (chained) operations using ghPython are also a lean way to implement (recursion/iteration) in your GH definitions


Provided you can code Python… :sweat_smile:

My today poor-code-man´s attempt from today I´ll try to look into your suggestion to pythonize it.

a very interesting approach that ghpython offers (also c# component, but ghpython is more appropriate in that context IMO) is that you can develop your gh definition as usual, except for a very specific part. For example, you could write a mini script that only applies recursively a function behind a single gh component of your interest (even one from topologic) using the “Node In Code” idea


Also, you can pass around Python dictionaries totally willy nilly through Grasshopper wires*, negating the Topologic plugin (assuming that’s its only use in your pipeline) :snake:

*We use Python dicts alot within my group at BIG for their simplicity (minimal syntax compared to e.g. C#) and flexibility (maps onto to e.g. JSON and can be serialised natively).


Thanks @aitorleceta and @AndersDeleuran for the tips.
The thing about Grasshopper’s dataflow is that dictionaries “have to be” routed parallel to the geometries, right? It’s rather uncommon that entities (like the topologies) carry their own dictionaries, right?

Anyway, my question was more about the management of several chained/nested booleans than about the dictionaries.

if python is out of scope, did you try Anemone or hoopsnake to domesticate those chained/nested booleans?

1 Like

Didn’t think of it as they are not really iterative but related to each other. Perhaps “layered” would be a better term. Or how to implement a matrix relational table for all the pairs within a group of 5 objects without writing/constructing 25 combinatorial pairs.

The obvious answer to this question is “cross reference” but you already know that, probably.
Not enought information to understand your use case, I guess. I did try.

1 Like

And I´m grateful, you know.
I have to find the time to clarify through a diagram or something…

1 Like