Null Planes and Combine Data

I have a data structure of planes that looks like {A;B;i} where i is equal to 14. I separate the planes out using Sift so I can do some alignment/orientation to them, but when I do so the <null> items in the sifted branches become Null Planes.

Once I’m done working with the planes I’d like to combine them back into their original data structure. I tried using the Combine component, but found that the Null Plane type that is created doesn’t work the same as <null> when using Combine.

I have a work around where I use Clean Tree to remove the Null Plane values from each list and then use Merge to recreate the structure I had originally, but this relies on me linking the separate branches in the correct order.

I’m not a wiz when it comes to data structure management, but this project is really reliant on the structure remaining intact while moving through the script; is there a more elegant solution than cleaning and merging?

Cheers,

Luke

To Identify null plane you can check the IsValid property or test if the plane is equal to Plane.Unset

Hi @Lukxf,

You could again filter out the Null Planes by for instance checking, if both the x- and y-axes of the planes are zero vectors. A zero vector should have magnitude 0.0. You can use the resulting True or False values to cull the Null Planes again and thus get back the <null>s.

Thanks @diff-arch!

I modified your suggestion and instead deconstructed and reconstructed them using the <null> from the decomposed x and y values, which recreated the <null> values in my data tree.

1 Like

Even simpler! Great.