Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations KootK on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Trig equations in sketcher not evaluating properly 1

Status
Not open for further replies.

jdomechanical

Automotive
May 19, 2014
9
equation_1_yqdego.jpg
eval_1_jo5pxm.jpg
equation_2_tnhdpp.jpg
eval_2_ez3a9d.jpg


My problem is that I am inputing a simple trig function into sketcher, and it evaluates fine.

when I make it an equation (so others can see the function) it evaluates to near zero, which is obviously not correct. I have shown this in the photos...

I am new to Solidworks (7 months) so it is probable I am missing something...

Solidworks 2021 SP5.1
 
Replies continue below

Recommended for you

Your example is showing the same calculation result that the OP is saying is erroneous. i.e. why is the inverse tangent of 0.03125rad returning 0.03 and not 1.79 degrees?

 
What in the actual heck do you mean by the arctangent of 1/32rad? You can't find the arctangent of an angle.

However, the way that SolidWorks is ATTEMPTING to interpret your PEBCAK is by first translating your specified value of 1/32rad into the units specified in "Angular equation units" at the bottom of the equations box. So, the value (one divided by thirty two radians) becomes (one dividied by 1833.46 degrees). Why? Because 32rad=1833.46degrees.

Please note that the way SW evaluates units, 1/32rad does NOT mean one thirty-second of a radian. Units are stuck to the actual number they are attached to before the rest of the evaluations happen. If any unit conversions need to happen, they happen to the digits attached to the unit prior to evaluating any math. If you wish to specify the value (1/32)rad, you must either use 1rad/32 or 0.03125rad Now you're asking SW for the arctangent of 1/1833.46 inverse degrees. SW says "WTF does this even mean? I'm going to ignore whatever inverse degrees are supposed to be." And it tells you the arctangent of 1/1833.46. Which is 0.03something degrees.

Why does it work when you just type the value straight into the dimension rather than making it an equation? Because SW ignores your error sooner. Because you're not passing through the actual Equations processing method, SW just tries to evaluate atn(1/32rad) without trying to change your radians into degrees first. So it says "WTF is an inverse radian? I'll just ignore that part." And it gives you the arctangent of 1/32.

It may seem a little backward at first, but performing the unit conversion first before any math is done is just the way it works. Probably easier to program. SW is a solid modeling program after all, not Mathematica.
 
yes, the problem all along was the units - I don't know what I was thinking...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor