Problems I having with Trig in Parameters and iLogic

Problems I having with Trig in Parameters and iLogic

chris
Advisor Advisor
661 Views
1 Reply
Message 1 of 2

Problems I having with Trig in Parameters and iLogic

chris
Advisor
Advisor

I'm running into some issues while trying to add some trig functions in either the Parameters window or in iLogic, so I'm looking for some assistance.

 

Example: If I use a parameter called "P_T", (which is a value of "2" and has a unit of inches) in another parameter and I type it like this: ((P_T)*1ul), I would expect to get a value of = 2ul

but I don't, I get a value of = 5.080000 ul

 

The issue I'm running into here is I'm trying to do some sin, cos, asin, acos equations, which involve unitless and angle inputs of numbers that are lengths and I can't figure out how to write this stuff, and when I try to write it in iLogic vs. Parameters, I get different results.

 

Here's a "short" video showing/explaining a couple of the problems I'm having and the differences I'm getting when "I think" I'm writing the same equation between Parameters and iLogic.

 

0 Likes
662 Views
1 Reply
Reply (1)
Message 2 of 2

chris
Advisor
Advisor

Update: I went back and watched that video again, and I noticed a little gem, (see video 41:46), applying the "divide by 1in, then multiple by 1in I was able to get this to work in Parameters:

 

Asin Value:     asin(( ( ( LOD / 1 in ) - ( SOD / 1 in ) ) / 2 ul ) / ( P_W / 1 in ))

Cosine Value:     ( P_T / 1 in ) * 1 deg * ( cos(180 deg - ( 90 deg + ( asin(( ( ( LOD / 1 in ) - ( SOD / 1 in ) ) / 2 ul ) / ( P_W / 1 in )) ) )) )

 

 

0 Likes