Grasshopper Expand Object loses paths (sometimes)

If a GH tree of Speckle Object is passed to an Expand Objects node it will preserve the path id if the tree is cleansed of empty branches. If the empty branches remain, the path ids are lost.

GH Expando

This is a potential problem when lacing different datasets back together.

As per the demo gif, if the solution is to always clean the stream, so be it. But it feels like an error.

1 Like

Hey @jsdbroughton!

It may be early in the morning, this does look like a bug… I’ll look into it as I’ve modified some things for the next release.

In theory, paths should keep the branches as-is and output to the right one.


So, it’s definitely a bug. This was caused as a side effect of not creating a task for every iteration on the TaskCapableComponent, the DataAccess class would loose track of what iteration generated what result, leading to index shifting of the output:

Whatever was the first task result generated was the one going to branch 0, which is inaccurate.

Already have a fix on the way, so you’ll have this fixed by the next release! Thanks for pointing this out. I think some other user’s complained about something similar but wasn’t able to pinpoint the root cause.

For my future self: ALLWAYS generate one task per iteration, even if the result is no data.. Short circuiting the solution has unwanted sideffects.

I’m guessing this is the result you were expecting @jsdbroughton :wink:

1 Like