Hello
Is it possible to put an equation in an assembly that means:
if the ØA is < to 6, the ØB will be = to 14 and if the ØA is > to 6 but < to 8, the ØB will be = to 17 and if the ØA is > to 8, the ØB will be = to 21
Thank you for helping me.
1 Like
pl
March 11, 2015, 2:49pm
2
Hello, it's possible on several lines:
Let us (for example):
EQ1 = if ( "DiamA" <6, 14 ,17)
"DiamB" = if ( "DiamA" >8, 21 , EQ1)
See this similar question:
http://www.lynkoa.com/forum/3d/equation-if
Edit: correction
5 Likes
pl
March 12, 2015, 7:41am
4
What is diamA and diamB?
In the equation I wrote, EQ1 is only a temporary value, and I don't see anything like that in the attached image.
And why is there +2 at the end of the line?
In fact I have in my question ØA and ØB to explain the pb but the ØA corresponds to "Ø ext roue@Esquisse1@Pièce standard 5-link wheel. Part" and the ØB corresponds to "Ø ext@Esquisse1@063.13.01.Part " in my drawing.
pl
March 12, 2015, 8:15am
6
So we have to write:
1st equation:
EQ1 = if ( "Ø ext roue@Esquisse1@Pièce standard 5-link wheel. Part" <6:14,17)
2nd equation:
"Ø ext@Esquisse1@063.13.01.Part " = if ( "Ø ext roue@Esquisse1@Pièce standard 5-link wheel. Part" >8, 21 , EQ1)
EQ1 is just a temporary value, but does not correspond to a dimension, and it is used in the 2nd only if B is less than 8.
The equations in the above message correspond to:
If "Ø ext roue@Esquisse1@Pièce standard 5-link wheel. Part" is:
- less than 6 then "Ø ext@Esquisse1@063.13.01.Part " = 14
- between 6 and 8 then "Ø ext@Esquisse1@063.13.01.Part " = 17
-greater than 8 then "Ø ext@Esquisse1@063.13.01.Part " = 21
1 Like
Perfect, it works!
Many thanks!!
I'm going to complicate things a bit ! :-)
I now want this setting to work, I want the center distance of the purple piece to follow the Ø ext of the purple room. That is to say:
When the Ø is = at 14, the centre distance is 5.5
When the Ø is = at 17, the centre distance is 7
When the Ø is = at 21, the centre distance is 9
How do you write that?
1 Like
That's another question but on the same subject.
pl
March 12, 2015, 10:00am
10
This question is marked as resolved, your second question is slightly different, I think it's better to open another one.