Is there a correct way to make this?
If data stream B has no information, use the A.
But when B has a tree, use B.
It is kind of works, but Stream filter goes red
Can you please include the GH files as attachment?
Trying to understand what is the best way to use stream filter with tree as an input.
You could do sth like this:
If the length of the tree is > 0 it uses the result of the region difference component (if the water region doesn’t intersect or is inside a side boundary nothing will happen), if the tree length is = 0 region difference will throw an error and the original site boundary is used.
StreamFilter_01.gh (18.8 KB)
Thank you. looks cleaner than mine
I also recommend wombat’s “Backup Data” component for these scenarios — it uses the stream in A, but if the list is empty or null, it uses the values going into B as a “backup plan.”
Thank you Andrew, will try it out… using your plugins anyway:)
Another quick question, what would be a good strategy for spiting surfaces / regions to be able to sort them. Say plots and roads.
I was always using surface split, but is hard to sort afterwards and it is slow.
SurfaceSplit.gh (16.4 KB)
I don’t know of a better way than surface split that can do the actual region intersection in a way that handles voids (as opposed to just curve intersection), but as far as sorting afterwards, I often convert everything to a mesh and do a fast distance check:SurfaceSplit.gh (26.6 KB)
Thank you @andheum. Great technique. I ended up using prep split and listing 0 item. Not sure if it will work in every case, but works so far.