I have a set of surfaces that form a larger group, totaling five distinct sets. These sets are being trimmed using lofts, which results in the individual surfaces within each set being cut into fragments.
My goal is to ensure that those resulting fragments keep the layer of the original surface before the trim operation. I’ve managed to match the data tree structures, but for some reason, the first trimmed surface (for example) is not ending up in the correct layer (Layer1).
Could you please help me with this? I couldn’t upload the routine because I’m using the Human plugin, which prevents internalizing the geometry. Thanks!
then I would remove Trim Tree, connect the Tree Stat directly to the output of the Splitting operation, and Graft both the Repeat data inputs (don’t know if it’s relevant to assume all your Breps get split at least once… need the actual file to check that )
If you see the second branch of layers. You could see two surfaces in Capa 02, one in Capa 03 and other in Capa 04. But in the second branch the open breps has the same index that Capa 04 and 03 in Layer tree.
the Repeat Data is fine as long as you need to manipulate that data further, otherwise (if for instance you need it just to tell GH on which Layer to bake stuff) it’s superfluous, because GH works on the principle of Longest List, so this is enough:
do not be bothered by the different path addresses the Layer structure has: those numbers are for us humans GH plainly ignores them and just matches branches 1:1 [but if you are really bothered, you can apply Principal like here]