angle units within expressions

angle units within expressions

Anonymous
Not applicable
2,038 Views
11 Replies
Message 1 of 12

angle units within expressions

Anonymous
Not applicable

I am trying to use expression tan(tool_tipAngle).

 

The angle is 45 deg but the calculated value is 0.0637707.  As far as I know tan(45 deg) = 1.

Why??

 

Thanks

 

Marek

 

0 Likes
Accepted solutions (1)
2,039 Views
11 Replies
Replies (11)
Message 2 of 12

Anonymous
Not applicable

What is the diameter of your tool?

0 Likes
Message 3 of 12

Anonymous
Not applicable

3/8" dia

0 Likes
Message 4 of 12

Steinwerks
Mentor
Mentor

Is it using the .01" diameter? Are you using tool_diameter or tool_tipDiameter in your calculation?

Neal Stein

New to Fusion 360 CAM? Click here for an introduction to 2D Milling, here for 2D Turning.

Find me on:
Instagram and YouTube
0 Likes
Message 5 of 12

Anonymous
Not applicable

Actually, I want to have formula to calculate distance from tool tip to full too diameter  ((tool_diameter-tool_tipDiameter)/2)/tan(tool_taperAngle) 

I am getting problem with tan(tool_taperAngle)    the returned value should be 1 for 45 deg.  I have no idea why I am getting 0.0637707 in

 

I am "cheating" and I use regular endmill to get helical ramp down as I want it. With chamfer tool I am not getting what I want to.

 

 

 

0 Likes
Message 6 of 12

peter.pretsch
Autodesk
Autodesk

Hi Marek,

 

the angle is in radians. You can use the following formula to have the flute length match the tip diameter and tool_diameter.

 

((tool_diameter-tool_tipDiameter)/2)/Math.tan(tool_taperAngle*2*Math.PI/360)

 

Kind regards,

 

Peter


Peter V. Pretsch
SW Development Manager
0 Likes
Message 7 of 12

daniel_lyall
Mentor
Mentor

@Anonymous there's some usefull info here http://nicholscornercam.blogspot.co.nz/2017/06/tool-parameters-for-fusion-expressions.html?m=1


Win10 pro | 16 GB ram | 4 GB graphics Quadro K2200 | Intel(R) 8Xeon(R) CPU E5-1620 v3 @ 3.50GHz 3.50 GHz

Daniel Lyall
The Big Boss
Mach3 User
My Websight, Daniels Wheelchair Customisations.
Facebook | Twitter | LinkedIn

0 Likes
Message 8 of 12

Anonymous
Not applicable

Peter,

Does it depends on what kind of field format is the expression used in?

I have tried to enter Math.tan(45.*Math.PI/180) just to verify calculated value.  I found, I do not know why, some inconsistency.

When I have entered  Math.tan(45.*Math.PI/180) into Axial Stock Leave field,  I have got 0.0393701 in.  (2D Contour)

When the same was entered into field Lead-IN Sweep Angle , the displayed value was 1 deg.

Can you please verify if you are getting the same results?

 

2017-06-20_065650.gif2017-06-20_065627.gif

Thanks

 

Marek

 

 

0 Likes
Message 9 of 12

peter.pretsch
Autodesk
Autodesk
Accepted solution

I can confirm that i am seeing the same and the reason is that the return value from the Math.tan is automatically treated as a value in millimeters that is then in turn converted to a value in inches.

 

So yes, you are right that there is different behavior for fields with different sets of units: spatial, angular, velocity etc.

 

You can circumvent this inconvenience by using this formula in inch documents:

((1 in)*Math.tan(45.*Math.PI/180) )

 

Kind regards,

 

Peter


Peter V. Pretsch
SW Development Manager
Message 10 of 12

Anonymous
Not applicable

Thanks

0 Likes
Message 11 of 12

Anonymous
Not applicable

Peter,

On the other hand, Can this behavior be considered as a bug?

Since the unit is set to inch then all numbers should be displayed in the same unit.

If someone wants to use formula to use it in these fields and will not catch it, the result might be  a scrapped part.

 

Thanks

 

Marek 

Message 12 of 12

peter.pretsch
Autodesk
Autodesk

Yes, this is a known bug that is tracked as CAM-1157.

 

Kind regards,

 

Peter


Peter V. Pretsch
SW Development Manager
0 Likes