Converting Variable Type (Angle to a Number)
Erci_Cheung
Member Posts: 15 PRO
New to Onshape and was wondering if there's a way to convert an Angle variable type to a Number? Trying to circular pattern and calculate the number of instances based on the angle variable but it does not like, so is there a way to either convert it or somehow allow me to do some math on it. If I convert the angle to a Number type it works fine but it messes up other things since the variable is no longer an angle. Here is what I have in the Variable Table for Value:
round(#ANGLEPI/180#RADIUS_PITCH)
Tagged:
0
Best Answer
-
Divide by the unit.
So if #Angle is an angular type, doing #Angle/degree will give you a number in degrees.www.smartbenchsoftware.com --- Renaissance --- Kestrel -- SmartLink
Experts in Onshape Automation - Custom Features and Integrated Applications2
Answers
-
Divide by the unit.
So if #Angle is an angular type, doing #Angle/degree will give you a number in degrees.www.smartbenchsoftware.com --- Renaissance --- Kestrel -- SmartLink
Experts in Onshape Automation - Custom Features and Integrated Applications2 -
Thanks
0
