Clean tree not working as expected

I am using the clean tree component but somehow it isn’t removing the branches. Am I doing something wrong?

I even set all the booleans to True

Is the component supposed to function differently or is there some other component that I should be using?

clean tree.gh (9.2 KB)

1 Like

I have already tried this and it doesn’t seem to work

He wants to remove empty, but the way the data is presented empty is actually a text, so the branch is not really empty.

1 Like

Thank you, this will work for now.

But is there any way to avoid the red component?
And would it still function if there was data other than a number?

Maybe, we have to know how that list was generated… unless it is a top secret, then lord knows :slight_smile:

Haha, the list was in fact an empty text. I generated the ‘empties’ using ‘replace item’ component without providing any replacement items as list.

Should I change any parameters there to make sure that it works with clean tree?

you can use this because all empty’s have the same index 0

and this ; cull index 0 than clean the tree from empty

1 Like

Thank you, this will work for now. Is there anything else I can do to remove ‘empty’ text instead of the ‘’ parameter?

i don’t know maybe when you internalised data the empty’s converted to texts as David said

Hi…I am struggling with this node as well…

I got it working for tree

it is working for list null;
but does not work for a list empty

is it a bug ? or there is another node for a list?

I don’t think it’s a bug and I have no idea about another component, but you could do something like this…


Remove Empty_re.gh (13.7 KB)

1 Like

I would simply graft the Tree input and then shift path the Tree output.

In that way you are dealing with the same model as in the first picture.

The “empty” in the component means a list with zero items. The “empty” in the panel means a string with no characters. They are not the same kind of empty.

You can clean up your list by removing items with zero text length.

{0;0}:zero items list
{0;3}:zero length text