looking for ldcad linkage animation help - Printable Version +- LDraw.org Discussion Forums (https://forums.ldraw.org) +-- Forum: LDraw Programs (https://forums.ldraw.org/forum-7.html) +--- Forum: Rendering Techniques (https://forums.ldraw.org/forum-20.html) +--- Thread: looking for ldcad linkage animation help (/thread-25727.html) |
looking for ldcad linkage animation help - liu - 2021-12-13 tried several hours couldn't sove it https://youtu.be/QSMPZDEJ_H4 ldr file I'v upload to google drive https://drive.google.com/drive/folders/1e6mKWJgjZBAjksf-odl2Rorq8Yz7NNnm?usp=sharing Could somebody help me? RE: looking for ldcad linkage animation help - David Manley - 2021-12-13 Presumably you are wanting something like this for the linkages animation? I did this using the linkages script as described in this forum post, tweaking your model a bit to try to illustrate how to set up the parts for the linkages animation. The modified LDraw file can be download here. Hopefully this is enough to help but if not, you're welcome to post questions here. Regards, David RE: looking for ldcad linkage animation help - liu - 2021-12-13 (2021-12-13, 7:26)大卫·曼利 Wrote: 大概你想要这样的链接动画? RE: looking for ldcad linkage animation help - liu - 2021-12-13 (2021-12-13, 7:26)David Manley Wrote: Presumably you are wanting something like this for the linkages animation? RE: looking for ldcad linkage animation help - David Manley - 2021-12-14 Here's a video of the animation including the rotation of the lower axle assembly. My presumption is that the part "motor.ldr" in your model is some custom part as it is not a standard LDraw part, hence why there is a part gap in the video. The animation was created by making use of LDCad's POV-Ray animation capability. I made the following additional refinements to your model;
You can download the revised model from here. I also tweaked the linkages script specifically for your request. The modified script (download it from here) not only rotates the linkages (as per the video) but at the same time rotates the whole model too (as per your request but the model rotation is not included in the video above). Note that the modified Lua script requires the lower axle assembly to be named "driver.ldr" for it to work. There are two blocks added to the linkages script; one towards the end of the function on4BarFrame and one at the end of the function on4BarStart. The blocks are commented with today's date so you should be able to see the difference to the normal linkages.lua script. Regards, David RE: looking for ldcad linkage animation help - liu - 2021-12-14 Thank you very much for solving the problem This program work well for that assembly,even i find how to change the speed of the assembly rotate around the Y axis But yesterday i made another assembly and used gear to transmit power The driver gear is 8 teeth ,next to it is a 40 teeth gear , 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 same tome it has the opposite rotation i upload the files to GoogleDrive check here Looking forward to your help RE: looking for ldcad linkage animation help - liu - 2021-12-14 (2021-12-14, 16:18)liu Wrote: Thank you very much for solving the problem RE: looking for ldcad linkage animation help - David Manley - 2021-12-14 (2021-12-14, 16:18)liu Wrote: <snip> 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 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 RE: looking for ldcad linkage animation help - liu - 2021-12-15 (2021-12-14, 19:35)David Manley Wrote: In the function on4BarFrame, towards the end of the function, immediately after the line 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 RE: looking for ldcad linkage animation help - David Manley - 2021-12-15 (2021-12-15, 5:09)liu Wrote: the left rocker should move follow the right rocker , but I tried , couldn't make it That is because the linkage animation script works only for a 4 (or 3) bar construction. By my counting, your "10" model is a 7 bar linkage construction. That requires calculations which do not exist in the linkages script. So I'm afraid I can't help you with this one. Regards, David RE: looking for ldcad linkage animation help - liu - 2021-12-15 (2021-12-15, 8:09)David Manley Wrote: That is because the linkage animation script works only for a 4 (or 3) bar construction. By my counting, your "10" model is a 7 bar linkage construction. That requires calculations which do not exist in the linkages script. So I'm afraid I can't help you with this one.Thank you for your reply ,i'll try hard to learn more about lua and math |