How to subtract surfaces that are bigger than the original

I am developing a routine that requires some surfaces to be disregarded.
In short, if a surface category touches another coplanar category, it must disregard the intersection of the two, and if this second one covers the entire surface, it must be disregarded.
In my code, I am using the Surface.Difference block and it is doing what I want, returning null when the entire surface is disregarded, but Dynamo returns an error signal but the code still runs. Is there any way I can remove this warning?

Wire this into a List.Clean node with ‘preserve indices’ set to false, and proceed with the rest of the graph from there.

I take another print to detail more, this does not solve my problem
Its ok to have null values on the list, i was filtering with a bool mask later on, my problem is the waring singal that shows in the block. Using the List.clean does not take it out

Ah you just want to suppress the warning? Leverage function passing then.

Disconnect everything from the first input, pass the Surface.Difference into the function input of a Function.Apply node, and then wire the previous input into the argument input.

This will suppress ALL warnings though, so you will want to do some data validation to prevent other issues.

1 Like