Parameter containing ratio not evaluated correctly

Parameter containing ratio not evaluated correctly

patrik-web
Advocate Advocate
604 Views
2 Replies
Message 1 of 3

Parameter containing ratio not evaluated correctly

patrik-web
Advocate
Advocate

I'm doing some arc length calculations and am running into problems:

 

I have two parameters: "length = 1"" and "radius = 2"".

 

Now I want to calculate a third parameter that is the remainder of a 90-degree angle after this arc. I add a new parameter 

 

"remainder", set the unit to angle/deg and enter the expression "90 deg - 1 rad * (length / radius)". The answer should be 90 deg - 1 rad * 0.5 or about 90 - 57/2 = 58.5 degrees. However, when I hit enter in the expression window, it is replaced by "90 deg - 1 rad mm / mm", or 32.7 degrees. The factor 1/2 from the ratio of the two lengths is missing.

 

I was under the impression that the expression calculator should be able to handle ratios resulting in unitless numbers. Is that not the case, or is this a bug in the code? It's in any case pretty bad that it does not give an error but just silently substitutes an incorrect result.

 

0 Likes
Accepted solutions (1)
605 Views
2 Replies
Replies (2)
Message 2 of 3

lucasproko
Alumni
Alumni
Accepted solution

Hey @patrik-web,

 

I'm sorry you're running into this issue. I was just able to recreate the situation on my computer using the same steps you described. I'm guessing this is a bug in our system, but I will follow up with a few of my colleagues to see what exactly causes this behavior. In the meantime, there is a work around if you create an additional parameter to hold the unitless value, and then use that parameter in your calculation as you see below.

 

 

2017-07-17_23-38-01.png

 

Hopefully that helps a little bit, but thank you for pointing this out!


Lucas Prokopiak
Fusion 360 Product Manager (Sketch/Model)
0 Likes
Message 3 of 3

patrik-web
Advocate
Advocate

Ok, that's a decent workaround... as long as you notice the result being wrong in the first place. 😉

 

0 Likes