"Larger than" block not working properly with certain points

Hello,
I’m having some trouble with a “Larger than” comparison block. I’m trying to compare curves parameters with some threshold parameters. The curve and the threshold parameters are different for each curve and each curve can have up to 8 threshold parameters. The data structure is the following:

I have a list with a branch for each curve parameters, that feeds the “A” parameter of the block:
image

I have another list with a branch for each curve and inside of these branches there is another sub-branch with each threshold parameters, with Null items if a curve doesn’t one of the threshold parameters. This feeds the “B” parameter of the block:
image

The “Larger than” comparison works with most of the values, but there are some of them that don’t work properly. They are values that are very similar, so I suspect it could be something related with how GH computes the block.

I’ve made some tests and I find that if I compare a value that doesn’t work extracting the branch itself and comparing it, it works. See the following example with the value “77” of branch {30} and the threshold value “2”:

The value to compare is 0.385174:

The threshold value is 0.384734

The “Larger than” block should return “True”, but it returns “False”:

If I compare the values extracting the branches from the main tree, I get a “True”:

I wish I’ve explained the problem clearly. If there are more details that could help, please, don’t hesitate to ask.

Anyone has an idea of what could be going wrong? Thanks so much in advance.

Regards,

Lluís

Please post your file or a part of your file demonstrating the issue.

1 Like

Hi Martin,

Thanks for your answer!
Find attached the file. I’ve copied the data on a new file because the script is a bit messy.

Thank you for your help.

Regards,

Lluís
Threshold values.gh (160.3 KB)

Seems like all you need to do in this case is eliminate the empty items / branches in your second input.

Threshold values.gh (178.7 KB)

Great, thanks so much! I will try tomorrow on the main script, but it looks like it will be fine