Posts: 8
	Threads: 1
	Joined: Dec 2021
	
	
 
	
		RE: looking for ldcad linkage animation help
		
		
		2021-12-15, 5:09 
		
	 
	
		 (2021-12-14, 19:35)David Manley Wrote:  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
Thank you very much 
Now the final aninamtion is perfect 
Thanks again
Here comes a new problem in a new assembly(i'm confussed at how to subfile the assembly,tried several times counld't make the right animation . at last , i find maybe it's not the matter about how to  subfile the assembly )
the left rocker should move follow the right rocker , but I tried , could't make it 
i'v upload  the files to googledrive 
files
Looking forward to your help