Layer structure

Dear all,

I’m trying to create a layer structure 5 levels deep, I can make it work until the 4th level, using dummy “test” text to fill out the empty branches.

At the 5th level I want to add a series of numbers 01 - 05, to the paths ending in M1_Footprint Handles, so only the first items in branches {0;0;0}, {0;0;1} and {0;0;2}. I’m struggling to get this to work however, perhaps because at this stage I’m trying to avoid all filling up all the other paths with unnecessary “test” daughter paths.

So my question is twofold:

  1. How do I build a tree structure of layers without filling empty branches with dummy daughter layers?

  2. How do I add the series 01-05, just to the paths ending in M1_Footprint Handles?

Help would be greatly appreciated as this structure is to serve as a template for many future projects and being able to parametrically control the layer setup would be very valuable.

Best regards,

Mark

attaching your GH file would be very useful here :slight_smile: expecially for answering to 1)

for the other question:

this is the very very very first thing that comes to my mind:

question_2.gh (13.2 KB)

2 Likes

Hi Inno,

So sorry! I had the file ready, but forgot to post it :melting_face:

I updated my file as per your suggestion and it works!

I just wonder if perhaps the script could be a bit more concise?

I feel like this will be a fairly standard procedure throughout our company’s projects and the script still looks a bit suboptimized. What do you think?

Thanks so much for your help already!

Best,

Mark

Forumquestion_layerstructure 2.gh (15.0 KB)

This works! Thank you!

I just posted my script below, I feel like it could perhaps be a bit more elegant/efficient. Would love to get your feedback!

Why is INPUT::C1-C3 repeated 3 times? Are there supposed to be different input names?

And I don’t mean because there is a V1-V3. The entire layer blocks with parents INPUT::C1-C3 are repeated 3 times.

if you want to make your life easier, I’d advice to not put layers that are going to branch in the very same list of layers which are not going to branch (even if they belong to the same “Layer-Level”) :slight_smile:

Forumquestion_layerstructure_inno.gh (19.7 KB)

this produces:

It’s unlikey that the branches are necessary to create the layers, so you could also just Cross Reference > Graft > Merge

If I recall correctly, you can’t just enter the layers into Rhino’s Model Layer but will have to append them as children, or they will all appear as separate layers.

*advise. I only mention it because I have seen you make the mistake numerous times.

1 Like