Grasshopper

algorithmic modeling for Rhino

Hi all,

I have been searching a similar post for some time now with no success - do point me to a direction if I've missed it.

Boolean toggles are great, but they work for a single value. Is there a way of toggling true/false in matrix form? Ie. imagine a 2 level tree {A;B} with 5 branches in each level and the ability to have a 5x5 matrix to turn on/off any item, eg. {0;4} or {3;2} or whatever or even whole branches by using {2;?}

I managed to create a manual such matrix using a physical 5x5 matrix of toggles, stream components and merge but it is slow and cumbersome.

Thanks in advance! I hope this all makes sense.

Konstantinos

PS. in the photo the clusters show or hide items (ribs) on my grid. Then I merge everything back together and the tree structure remains functional in full (inserts nulls for items I turn off). Row number and rib number are the {A;B} tree "coordinates".

Views: 813

Attachments:

Replies to This Discussion

In general you can have "en-mass" ops with a variety of ways ... one of them is to split the tree with an appropriate mask (syntax is a bit "cryptic") and then display/work with the "portion" that you want. Another way is via the mapper (but that's "static" and thus doesn't work with variable dimensions etc etc). Another is via Relative Items (up to a point). Of course the ultimate way is via code where you can do anything imaginable.

Here's the deal: Leaving aside the nightmare captured ... er ... post a test case (abstract or specific) and list any imaginable requirement/wish of yours with regard item/branch/whatever control.

On the other hand and for 2 dimension trees ... you mean an ability to "click" on some kind of win control consisting from buttons in a Matrix like formation (see def attached) and display the corresponding DataTree branches (and by some other "right click expand" ability the items as well)  eh? ... like a Data Viewer with some added visual abilities.

Not a bad idea at all (but for higher dimensions ... er ... hmm ...).

Other than that and with regard more primitive viz control matters ... have fun with this attached that is made for a fellow compatriot who demonstrates astonishing  C# learning abilities:  rather phenomenal I confess. The good news are that everything in this def is doable via native components ... the bad are that the idea of yours is not (I'll post a demo case soon). 

Attachments:

Petro, thanks for your help,

Yes exactly. Having that matrix with buttons to do operations on the selected branches would be very cool. I'm sure that scripting can do it, I'm slowly being convinced that it can do anything!

I would first try to simplify my problem, before I jump into C# (never played with it before), the split tree command does work if you input the text of the branches you want hidden/nulled, albeit a lot more cumbersome than an ideal visual command.

Well ... in general code can do anything imaginable (and then some, he he) ...

... but the 1M question is: since writing this "visual" tree control is strictly related with 1-2  tree dimensions ... why bother doing it? (I mean that in 99.999% of real life cases ... er... trees have rather far more dimensions than 2).

Suggestion:

(a) Get a 3d PDF, open it with the latest Reader and see what the Model Tree thingy does (kinda like a Data Viewer + that wonder check box (per item) that does the visual on/off work). This is developed by Ray Bentley (of Bentley Systems) - enough said.

(b) Find a friend who knows CATIA and ask him a small demo upon the viz control with regard complex assembly/component combos ... that are in fact a "kind" of DataTree.

So the solution is in fact a "super" Data Viewer with the added ability to display stuff (if geometry is around, that is), simple as that.

That could be a phenomenal aid for anyone who does things with GH.

I would argue that there are a lot more than 0.001% of cases of "2D" trees in real life cases analysed by GH; any kind of grid pattern would apply, with engineers and architects making the most of it :) Even with "higher dimension" trees, if the problem lies in two of those "dimensions" (like in my case, my tree has a {A;B;C} structure but I managed to disregard {B} to solve it in 2D), then you're ok.

I will take your advice and look it further.

I'll make a small demo this w/e with regard a more "primitive" way to do this (without win controls).

Other than that, to give you a hint about the Model Tree > have some fun with this very old case (use Sections as well).

Note: The nesting used is primitive since I designed that thing with CATIA (what else?) and then ported some stuff to Microstation for Ray Bentley [for testing his marvel "toy" - good old long forgotten days when we both believed that 3dPDF has some bright future- little we know, he he].

Attachments:

Get these prehistoric test cases as well that are somehow "more" structured (but Microstation actually can't understand an iota from assembly/component design schema).

As you can see all these cases are actually a "kind" of DataTree.

PS: Switch to Solid Outline mode if your GPU is capable to follow the "action".

Attachments:

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