Keep attributes of intersecting objects the same as parent object


I have a surface model in Rhino. Those surfaces have different layers and their colors are assigned to the respective layer. Keep in mind that the amount of surfaces and layers is quite large. Then, using grasshopper, I intersect that model with several planes and extract the intersecting curves. My goal is for those curve objects to be assigned to the same layer of the surface that originated it. Keeping the parent color would be a plus! Any thoughts? Thanks!

Here’s a quick example using Elefront 4.3 (available on package manager or

re_section and bake to (7.8 KB)

1 Like

Hi Japhy,

Thanks for your reply!

I actually deleted my previous reply because I thought it did not work but indeed it did. However, it only works if the number of layers equals the number of objects. If I have, e.g., 10 different layers but at a given intersection my plane only intersects surfaces from 8 layers, then errors start to appear because the number of inputs from layers (10) is different than the number of objects (8).


Can you post a screenshot or small sample? Easy to fix but kind of depends on how you are referencing.


You can also find the files attached. As you can see, at 30m or 50 m from origin (x direction), the cross section does not catch any object/surface in layer 20 (green), hence the error I suppose. Thanks!

Example.3dm (55.7 KB) (13.8 KB)

Branching is a little more complex with Elefront 5.x on the attributes, before a single attribute would be applied to the multiple geometries in the geometry input tree. (20.2 KB)

Learn about data tree here…

Hi Japhy, I’m sorry for the late reply.

Indeed, I believe my problem is with properly handling data trees… I’m trying to learn more about the topic but it still is a bit confusing. I’ve been testing with your file and basically, when we depart from simpler models, it seems the algorithm stops behaving as expected. Please check this new Rhino model attached, which is just larger than the previous Example.3dm.

ExampleV2.3dm (17.4 MB)

As you can see, grasshoper is only able to properly handle layers for a single one cross section position. For more than that, the actual intersections appear incomplete.

Again, thanks for the help,