looking for ldcad linkage animation help


RE: looking for ldcad linkage animation help
#8
(2021-12-14, 16:18)liu Wrote: <snip>

Now ,I don’t know how to change the speed of the driver gear . it should be 5-times faster than the 40teeth gear next to it, at the same time it has the opposite rotation 

In the function on4BarFrame, towards the end of the function, immediately after the line

Code:
driver_lo = ldc.subfile():getRef("driver.ldr")

insert this

Code:
    rotation_lo:setRotate
    (
      math.deg(rotation_angle_ln) * 5,
      (animation_rotation_axis_mn == 1 and -1 or 0),
      (animation_rotation_axis_mn == 2 and -1 or 0),
      (animation_rotation_axis_mn == 3 and -1 or 0)
    )

By way of an explanation, the code tweak I did for your "08" model leveraged that the angle of rotation of the crank was the same as the angle of rotation required by the driver. Since it was a 1:1 speed ratio and with the rotation in the same direction, it could use the same rotation matrix. This amendment is multiplying the angle by 5 and computing a different rotation matrix for the driver. The sign of the X, Y or Z axis is inverted (set to -1) so that the rotation is in the opposite direction.

Regards,

David
Reply
« Next Oldest | Next Newest »



Messages In This Thread
RE: looking for ldcad linkage animation help - by David Manley - 2021-12-14, 19:35

Forum Jump:


Users browsing this thread: 1 Guest(s)