×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Degrees vs. Radians in ProE

Degrees vs. Radians in ProE

Degrees vs. Radians in ProE

(OP)

In ProE/Creo, for some reason I cannot fathom, PTC breaks from mathematics tradition by using degrees instead of radians in its calculations. This may be fine for simple functions, such as Sin(THETA), but completely fails for more complicated functions such as:
Cos(THETA) + THETA * Sin(THETA).

Because of this, the following will not work in a Curve From Equation scenario in ProE:

CODE -->

rb = .45333
ro = .53928

/*  "t" is ProE's internal counter variable (analogous to "trajpar"), and counts from 0 to 1.

/*  This equation is naturally with respect to radians, so the last term in parens converts from rads to degs:
THETAstop = ((Sqrt(ro - rb) * Sqrt(rb + ro)) / rb)     *     (180/pi)

/*  Now comes the "fun" part, where ProE's insistence on using degrees causes failure:
x = rb * (Cos( t * THETAstop ) + ( t * THETAstop ) * Sin( t * THETAstop ))
x = rb * ( Sin(t * THETAstop ) - ( t * THETAstop ) * Cos( t * THETAstop )) 

The last two equations are what they are and must be calculated with respect to radians, NOT degrees. So what is the solution to this conundrum?

RE: Degrees vs. Radians in ProE

(OP)
OK, I think I found the problem. The key is to apply a units conversion at only three particular points...Not for all instances of THETAstop:
/* Convert rads to degs:
THETAstop = ((Sqrt(ro - rb) * Sqrt(rb + ro)) / rb) * (180/pi)

/* Convert only one spot in each equation back to rads, before solving:
x = rb * (Cos( t * THETAstop ) + ( t * THETAstop*(pi/180) ) * Sin( t * THETAstop ))
x = rb * ( Sin(t * THETAstop ) - ( t * THETAstop*(pi/180) ) * Cos( t * THETAstop ))

The reason is obvious...A trig function of an angle will always give the same result regardless of units, provided the angle is in the correct units for the solver.
The second and third equations, however have a scalar applied (THETAstop), and this must be converted to radians before use.

RE: Degrees vs. Radians in ProE

(OP)
Another reason why my answers were coming out wrong is that I was expecting certain values of x and y, but did not take into account that I needed PROJECTED values. So along with the conversion thing, what I was getting back was bunk.

RE: Degrees vs. Radians in ProE

There is an alternative to conversion - Under the Utilities there is the option to select units.

RE: Degrees vs. Radians in ProE

(OP)
robertlib,

Where is that exactly? I can find a Utilities menu when I start up the Relations editor, but when you do a Curve from Equation, all you get is the WordPad interface with no way to change units.

RE: Degrees vs. Radians in ProE

It's in the standard relations editor (its also in the equation editor in creo 2). All it does is add [rad] or {deg] after the variable/number.

RE: Degrees vs. Radians in ProE

(OP)
Hm...I'm stuck then, I guess until I can get Creo 2. I only have Creo v5 m080.

RE: Degrees vs. Radians in ProE

If you look in your standard relations editor, you should find the same thing (I remember units being in Wildfire 3) - which means that in principle, you should be able to add [deg] or [rad] after the variable/number and get an accurate result.

RE: Degrees vs. Radians in ProE

(OP)
I guess that means avoiding "Curve from Equation" and going directly to a part level relation to do the same thing.

RE: Degrees vs. Radians in ProE

You could try to use the [deg] and [rad] in the equation editor - they have changed the format in Creo 2.0 to look like the standard relations editor, but I suspect that the underlying programming for the equations is identical to that of the relations.

RE: Degrees vs. Radians in ProE

(OP)
Ahhhh, OK. Just like a standard function.

RE: Degrees vs. Radians in ProE

(OP)
Thanks for the tip, robertlib!

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources