Consecutive Domains and T/F Filter if a Value is within those Domains

Hi All,

I have a bunch of surfaces and a few reference planes. I would like to group the surfaces based on which planes they land between… I’m not new to Dynamo but this is stumping me and frankly I use Grasshopper more than Dynamo. Let me explain my process that I would follow in Grasshopper.

I would create consecutive domains from the Z coordinate from the origin point of the reference planes (circled in red below)… For Example 40.989 to 30.968, 30.968 to 20.968, 20.968 to 10.968, etc… Then I would take the Z coordinate from the 0.5,0.5 UV point on surface (circled in blue below) and get a T/F list that I can then use to group the surfaces.

Any thoughts, ideas, help or different solutions would be much help. Thank you

You don’t really need to check both bounds as you know if a value is above the lower bound it’s below the upper bound. You should be able to get what you want with a nested IF statement.

Thanks for your quick reply Nick. I’m not quite sure I understand, could you explain a little further.

Nested conditional statements can help you determine where your values fall. There’s no need to check for boundaries 0 < n < 2 and 2 < n < 4 when you know that if the value is not greater than 2 but it is greater than 0 that it falls between 0 and 2.

1 Like

Amazing! Never knew about this… Thanks so much :slight_smile: