Unexpected branches out from GH cluster

Hi

I am making a cluster to be used to obtain values depending the distance between points obtained by intersecting different crvs.

each curve is referenced in to a GH , i can have up to 8 curves ( 1,2…8 ) each curve is generating a set of values contained in a specific branch and when the curve is missing the corresponding branch must not be created.

image

PROBLEM : the logic seems to work while running script from inside the cluster but then when i exit the cluster mode there are "ghost branches " showing up also when crv is not referenced.

HERE IS THE DEFINITION :
20240602 GH CLUSTER EMPTY BRANCHES.gh (24.8 KB)

does anyone know how to get rid of this “empty” branches ? i tried to clean the tree but its not working.

thnaks , regards

the script does not produce the problem you show in the picture if you don’t internalize also these:

on Clean tree you need to specify True for “Remove empty branches from the Tree” (by default it’s False)

1 Like

you are right @inno , sorry, attached please find script with all crv refenced and internialized.

20240602 GH CLUSTER EMPTY BRANCHES 02.gh (28.4 KB)

that said i tried to place clean tree outside the cluster but it does not work as shown in your post.

i still face the problem and the tree stratistic component is showing a different tree when connetcted inside or outside the cluster.

i don’t know whats wrong , i never faced this problem before , these empty branches are showing up from nowhere , there is no way to get rid of them and there is not a reason for them to be there, the problem is they they messed up everything downstream

Easy to find lots of threads that reference this problem, but no explanation of why this occurs and no solutions.

The Clean Tree components in the file you posted are not having any effect because the “problem” branches are not empty, they contain 1 item.

Since you are passing the original datatree through your cluster, you can use the empty branches from this to cull your result. Not a fix, but a possible workaround for the case you provided.

20240602 GH CLUSTER EMPTY BRANCHES 02_re.gh (29.8 KB)

-Kevin

1 Like

these 8 curve containers:

will each of those Curve Parameters always contain either zero or just exactly one curve?

thanks @kev.r and sorry for haven’t realized that before.

as i can see now this is an old issue and there’s no other than using your fix for the time being .

thanks for taking the time to collect the links and also for arranging the updated script.

cheers

Hi @inno , sorry i got you wrong when posting the script 02 but i actually attached 3 of the seven curves in order to show the problem

when i internialise all 7 curves there are no empty branches and there is no bug.

that said this is a the script with the 7 crvs and as you can see everything is working fine in this case.

20240602 GH CLUSTER EMPTY BRANCHES 03.gh (41.3 KB)

for the time being i will use @kev.r suggested fix, if you have any other idea please share. thanks

cheers

I understand what you mean :+1: my question was about using less than the 8 curves that the definition can handle now

for instance, if you are 100% sure that each Curve Parameter will always contain either nothing or one single curve, instead of Entwine you might use a grafted merge, like this:

but again, this works well only if each of your initial Curve Parameter will contain nothing or one single curve

1 Like