Converting Variable Equations from Fusion to Onshape
I am trying to redraw a variable table that was originally made in Fusion360 in Onshape. I started with just setting up all of the Variables and I have 5 formulas/equations (not sure which is the right word to use here, if either of those) that are kicking my butt.
1 - ( ceil(( Y_Usable - Edge_Offset_Y * 2 ) / Rib_Spacing_Min) ) + 1
2 - ( ceil(( X_Usable - Edge_Offset_X * 2 ) / Rib_Spacing_Min) ) + 1
3 - ( Y_Usable - 2 * Edge_Offset_Y ) / ( Ribs_YDirection - 1 ) - Rib_Thickness - ( Rib_Thickness / ( Ribs_YDirection - 1 ) )
4 - ( ceil(( ( Y_Usable - 2 * Edge_Offset_Y - Rib_Thickness * Ribs_YDirection ) / X_Rib_Length ) / 2) )
5 - ( floor(( ( Y_Usable - 2 * Edge_Offset_Y - Rib_Thickness * Ribs_YDirection ) / X_Rib_Length ) / 2) )
Can anyone help me write these correctly for onshape? I have copied them in and made sure to add the # to them all, and all of my variables are named the same. But they are all showing up red and not working. Any help here would be greatly appreciated!
Answers
-
The issue is the units.
ceil and floor functions only work on a number, not a "value with units".You can either divide the variably by the unit every time it's used and then multiply again by the unit at the end.
Or you could create the variables as numbers (instead of lengths), and then multiply by the unit at the end (probably less work…).
0
