I have a tree hierarchy "trunk > branch > twig". Each branch is a curve instance on trunk, each twig is a curve instance on branch. The whole thing is created with geometry nodes following this scheme (simplified):
on the left primary curve ("trunk") with 3 secondary curves instanced on it ("branch") with each 4 tertiary curves instanced on it ("twig")
I would like to get a convex hull for each branch and its "attached" twigs. Is there a way to "group" one curve instance and the other curve instances "attached to it" for the convex hull to operate on? Right now I only succeed in getting the convex hull for the whole tree or for each curve instance.
here an example of what I'm trying to achieve
- red: manually made branch+twigs convex hull example
- green: branch (curve instance on trunk)
- blue: twig (curve instance on branch)
Thanks to below answer by @Nathan, I could capture and store instance index, and select geometry where this value is equal to 1.
first "capture attribute" "index" on "instance
then store named attribute
finally separate geometry where the attribute is equal to "1"
The problem of this is that "separate geometry" produces two outputs (selection and inverted), while I would like to perform a convex hull on each of the groups.