Pipe command causing lists to change order

Hey all,
I’m attempting to pipe a list of curves that have been grafted into their own branches, and each assigned a different swatch:


The list of curves was trimmed with a brep after it was grafted to make sure that the swatches stayed with the branch even if the contents was split into two curves or deleted all together. You can see here that the two lists (before/after pipe) contain the same number and order of objects and empty branches:

But for some reason the pipe operation changed the order so that the swatches no longer match up with the correct curve:

I tried adding nulls, points, and new piped geometry into the list empty branches to fix the problem but it doesn’t seem to work.

Please post your Grasshopper file with the relevant geometry internalised

upload_PipeMismatch.gh (206.2 KB)

The problem starts here.

Not all of your 911 curves are inside the brep.

You have to provide matching trees with geometry and materials.

It can be done like this:

upload_PipeMismatch.gh (226.5 KB)

Thank you!
If I may ask a follow up question, why is it that the missing curves didn’t mess up the colored lines before they were piped?

because they are in their own branch even if it is null o empty,
How did you get those field lines and values?

1 Like

Ah good, that’s what I was hoping was the case. I was surprised that the branches weren’t maintained through the other operations.

The lines are from an openfoam case in butterfly and then run through vector smoothing loosely based on this post: Wind Flow Map to vectors or curves
I now realize you were also in that thread. It is super promising for stuff that isn’t supposed to be hyper accurate but more visually compelling.

1 Like