algorithmic modeling for Rhino
"a=b=c=x" does not mean "a, b, c and x are all identical". Instead, the equality comparers are handled in sequence, resulting in the following (((a=b)=c)=x) notation. So in effect there are 3 operations that happen consecutively:
So let's assume a, b, c and x are all integers and they are all 5. Then:
If you want to compare 4 values for equality, I'm afraid you'll need to use a more elaborate notation, something like:
If ((a=b) And (a=c) And (a=x), "Pt1Pt2", "")
--
David Rutten
david@mcneel.com
Poprad, Slovakia
Well thank you david, this helps me much. This is the basic math, sorry for the inconvenience.
I actually assign points based on criteria well defined:
In both cases entry may open curve closed curve. (C1 or C0)
In the case of C0: I have four other cases
In the case of C1 I have three other cases
If C0:
Pt1-Pt2 = 1 = 0
2-Pt1 = PTC1
2-Pt2 = PTC2
4-No Equal
if C1
1-Pt1 = PTC1
2-Pt2 = PTC2
3-No Equal.
Its become difficult to manage these conditions..
Thanks
Hello David,
I have another worry now, the apartment number of function "if" is limited?
Or maybe even a syntax error.
If ((a=b) And (a=c) And (a=x), "A1",If((a=x) And (a=b) And (c=y), "A2",If((a=x) And (b=y) And (c=x), "A4",If(a=x) And (b=y) And (c=y), "A3",If((a=y) And (b=x) And (c=y), "B1",If((a=y) And (b=y) And (c=x), "B3",If((a=y) And (b=y) And (c=y), "B2","Erreur"))))))
There's a limit in MS Excel IF Function, so maybe a VB thing.
Ok I'm going to start on.
If you want to test a list of values for similarity, you can probably use the [Create Set] component. If your resulting set only contains a single member, all your variables had the same value.
--
David Rutten
david@mcneel.com
Poprad, Slovakia
I'll stay on the idea of making a component for I fear that the definition will lengthen.
Thanks for your reply
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by