Condition filter doesn't work!

unhandled

(Ka) #1

hello every one,
I can’t understand why the filter passed the data although the condition is not true, in attachment you can find all requier data, exactly like the website protocol require, thank you
q6.gh (56.2 KB)


(Ka) #2

another quistion please , how to add more values to the second number of the equality component, i tried the set multiple number but it doen’t work, what i need is some thing like OR , for example if value is 3 or 4 or 5…i tried the or gate but also it didn’t help


#3

Moin Mark,

like this:


(Ka) #4

thank you so much!


(Ka) #5

it gives false although it is true… the equality component behave strangly!


(qythium) #6

My best guess from the screenshot is that it’s a rounding error issue- measuring curve length won’t return you a exact whole number 5 even though the panel displays it as 5, it’s probably 5.000000000736 or something due to floating point precision.

You should be converting both numbers to integers if doing integer comparison, or else taking the difference between the numbers and checking if that is below a certain tolerance.


(Ka) #7

you are right that was the problem, thank you


Member index on Floats
(qythium) #8

Also check out Pufferfish plugin, there’s a component called “Equality within tolerance” that makes it easy to avoid these kinds of mistakes :slight_smile:

image