- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
The following expressions produce different results:
round(4) * 1 mm = 4 round(4 mm) = 0 round(5) * 1 mm = 5 round(5 mm) = 10 round(15.2) * 1 mm = 15 round(15.2 mm) = 20
As you can see, when the units are inside the brackets, Fusion rounds to the nearest 10 rather than the nearest whole number. This doesn't seem to happen with other functions such as abs(). The workaround is to ensure the units are outside the brackets.
The following screenshot shows the actual results in Fusion:
Why this is a big problem: If the argument to the round() function is a variable, the value assigned to the variable will usually be a dimension with units, e.g. 5 mm, which also causes the problem to happen:
WasherThickness = 0.8 mm WasherSocketDepth= round(WasherThickness+0.2) * 1 mm
In this case putting the units outside the brackets doesn't work becasue the variable already has its own units, which would results in mm²:
WasherThickness = 0.8 mm WasherSocketDepth= round(WasherThickness+0.2) * 1 mm ; Error!
Thanks!
Solved! Go to Solution.
