Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

iLogic basic math equation returns wrong value?

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
william
383 Views, 2 Replies

iLogic basic math equation returns wrong value?

Hello Everybody

I type the below equation into ilogic:

Carcase_OAL_A = Tan(Corner_Angle_A/2) * Booth_Depth

Corner_Angle_A = 60deg 

Booth_Depth = 635mm

I should get a value of 366.617 for Carcase_OAL_A

Instead I get -4067.38mm

 

I type it in like this:

Carcase_OAL_A = Tan(Corner_Angle_A / 2 ul ) * Booth_Depth

I get -4067.38mm again

 

I type it in like this:

Carcase_OAL_A = Tan(30) * Booth_Depth

I get -4067.38mm again

 

I type in this equation:

Carcase_OAL_A = Tan(Corner_Angle_A) * Booth_Depth

I get a value of 203.22mm

 

It does not let me divide the angle parameter within the tan brackets. When i hover the mouse over the tan function the example shows a equation within the tan brackets. Capture.JPGCan anyone explain what is going on? 

2 REPLIES 2
Message 2 of 3
JhoelForshav
in reply to: william

Hi @william 

The Tan-function takes arguments in radian, not degree. Since your parameter is in degree you'll have to convert it its corresponding radian value. Like so:

Carcase_OAL_A = Tan(Corner_Angle_A/2 * PI/180) * Booth_Depth

 

Message 3 of 3
william
in reply to: JhoelForshav

Thankyou

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report