|
CADquest Article Series
Featured in "Pro/E The Magazine", July/August 1998
Linear Motion
The simplest form of motion is linear motion. Define a parameter and use it in a relation to
increment a linear dimension value during regeneration.
Example:
d12 = d12 + incr
Radial Motion
Radial motion can be accomplished in a similar manner. The only difference is that a angle
dimension may not be driven to 360 degrees or above. Test for the condition where the angle
dimension is one increment value less than 360, and if so, set it to 0 degrees
(which is visually the same as 360). Increment the angle dimension the same way as the linear
example, with a relation.
Example:
if d6 == 360 - incr
else
d6 = d6 + incr
Oscillating Motion
To achieve oscillating motion, define the maximum and minimum range of motion using parameters.
Also using a parameter, define the increment of motion. In the relations, test to see if the
dimension being varied is equal to or greater than the maximum, and similarly for the minimum.
Using a direction parameter, you can flip the direction of motion as a result of the test.
Then increment the dimension using the increment parameter times the direction parameter.
Example:
max = 90
min = 0
if d15 >= max
if d15 <= min
d15 = d15 + (( incr ) * ( $dir ))
At each regeneration of the part, the dimension (d15) is increased (or decreased) by the value
of the incr parameter. By changing the incr parameter you can adjust the smoothness of the motion.
When the dimension is greater than or equal to the max, the first test passes and the direction
parameter it is set to -1, which reverses the direction of motion. When the dimension is less
than or equal to the min, the second test passes and the direction is reversed again. This
oscillating motion continues with each regeneration. Create a mapkey to regenerate your model
10 times or so. Use this mapkey to show the motion of your design.
Steven G. Smith,
CADquest,
Harrisburg, PA
|