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
/* 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
RE: Degrees vs. Radians in ProE
RE: Degrees vs. Radians in ProE
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
RE: Degrees vs. Radians in ProE
RE: Degrees vs. Radians in ProE
RE: Degrees vs. Radians in ProE
RE: Degrees vs. Radians in ProE
RE: Degrees vs. Radians in ProE
RE: Degrees vs. Radians in ProE