How to retrieve layer information from trimmed surfaces

Hi,

Is it possible to track down the rhino layer name from a specific GH geometry?

For example, I have three Surfaces from different rhino layers. these are intersected by a solid. the intersection surfaces are moved upwards as shown below. I would like to know what the corresponding layers are from each trimmed surface. at this point the Surfaces are all on the same red ‘grasshopper layer’.

I thought lunchbox’s Layer Information tool could give me that information per geometry but this just gives all the layer names in the rhino model.

Is there another way to read or attach layer information to geometries?

Thank you all in advance!

Human & Elefront have components that read object attributes.

2 Likes

I will check this out tomorrow but it looks really promising! thank you!!

@Rickson Thank you for the answer! The read object attributes components are great functions.

however, it seems that after running a brep split all layer information is lost.? Is there a work-around? I’m planning on using this for a complex Multi-layer model.

Thank you!

Hessel

tag #elefront #grasshopper:human

If I’m not mistaken, yes.
After a lot of components actually.

You would have do adapt your lists of layers, attributes or user attributes on the side so they match up again at the end of the definition, for bake purposes.

Here for example you could duplicate layers data (names) depending on the lengh of the branches created by split brep multiple

1 Like

thanks for replying!

I’m still working on it, but it seems to be that the input sequence of Surfaces (in the data tree) is matching with the output splitted Surfaces. I can read the object attributes from the input so it should be possible to match that with the output Surfaces after splitting.

Thanks for helping!

last question: what determines the order of items in a list? like the surface sequence shown in the panel below?

If anyone has another amazing idea about this, i’m happy the hear from you!

I’m not sure I get your question… :slight_smile:
but all the attributes are in the same order as your geometries.

The order of those surfaces depend on the way you create them, or in the order you reference them.
Without a file it’s a bit difficult to explain this on your specific case…

1 Like

I read the Surfaces from Rhino with a geometry pipeline. As can be seen in the yellow panel above, the object in this layer are in a certain sequence. It does not depend on axis-position and also not on order of creating the Surfaces in the layer.

But if the input and output stays in the same order, it does not really matter for me atm :wink:

Hello! Just wondering if you found a solution/could explain to me how to solve this issue. I’m not sure how to retrieve the layer attributes after carrying out the split multiple component! Thank you.

Hi. The layer info can only be obtained before splitting. after you carried out the multiple split, your Surfaces will stay in the same ‘tree’ as where they came from. (use component ‘panel’ to see what happens after each compononent). for example input is ‘untrimmed surface’, output is ‘trimmed surface;trimmed surface; trimmed surface’
because the trimmed Surfaces are still in the same tree, you can combine the list with layer info with the list of trimmed Surfaces. (use components like ‘entwine’, ‘merge’, ‘cull pattern’, etc.)

I don’t know if this makes any sense. To help more specific, could you share your problem? (or a simplified version of it)

Hello! Thank you for your response! I am fairly new to grasshopper so still learning.

This is what it’s looking like at the moment. Do you mean I combine info from the breps with the trimmed surfaces after split multiple?

if i’m not mistaken, you just showed the solution. right?
what is it you want to achieve? you want to ‘bake’ the splitted breps and put them in the layer they came from?

is this what you’re looking for? I moved the splitted breps up to show that the baked output is on the same layer.

Hello! The entwine command helped! Thanks so much. Saved me hours!

1 Like