Tutorial: Modeling and Animating a 4-bar Linkage with AutoCAD

Поделиться
HTML-код
  • Опубликовано: 23 авг 2024
  • How to model a 4-bar linkage in AutoCAD using blocks and parametric constraints. A VLISP program is used to animate the end result. Here's a listing of the animationrotation vlisp program. Note that RUclips does not permit the use of the "less than" symbol (left point "V" ). Be sure to edit the line with the WHILE statement by changing ??? to the less than symbol.
    (defun c:animaterotation (/)
    ; L. Minardi 12/22/2017 v1.0
    ; Animates a group about a specified point. User may specify:
    ; - center point of rotation
    ; - group name
    ; - rotation angle step size
    ; - delay factor for each step
    ; - number of steps in the animation
    (setq ctr (getpoint "
    Indicate center of rotation."))
    (setq AngStep (getreal "
    Enter angle step size (10): "))
    (if (= AngStep nil) (setq AngStep 10))
    (setq d (getint "
    Enter delay factor (100): "))
    (if (= d nil) (setq d 100))
    (setq gname (getstring "
    Enter group name (g1): "))
    (if (= gname "") (setq gname "g1"))
    (setq nSteps (getint "
    Enter number of steps (20): "))
    (if (= nSteps nil) (setq nSteps 20))
    (setq i 0 )
    (while (??? i nSteps) ; -------------------------------------- replace ??? with the "less than" symbol.
    (command "rotate" "g" gname "" ctr AngStep nSteps)
    (setq i (1+ i))
    (command "delay" d)
    ) ; end while
    (princ)
    )

Комментарии • 56

  • @allancohen
    @allancohen 2 года назад

    Genius! Precisely what I needed!

  • @TETOYVIENDO
    @TETOYVIENDO 3 года назад +1

    B R A V O!!! (standing ovation)

  • @b_gumm
    @b_gumm 4 месяца назад

    Excellent work!

  • @agll1156
    @agll1156 2 года назад

    Thank you! Excellent video tutorial!!

  • @davestephens8617
    @davestephens8617 5 месяцев назад

    Very good video, thanks

  • @brotherhood3331
    @brotherhood3331 4 года назад

    Thank you for you video it helped me very much

  • @andrewmerafuentes6683
    @andrewmerafuentes6683 4 года назад

    Thank you so much. Big help.

  • @NukleusMiguno
    @NukleusMiguno 2 года назад

    Thank you so much, it help me alot..

  • @barryking5342
    @barryking5342 Год назад

    Hey Lee, this works great, thanks so much! I can use it for training my aviation maintenance students on flight controls and ???. One bug so far, when trying different parameters for smoother action such as step size 1 degree, time delay 20 and steps 360 (a full circle) it sometimes crashes and becomes nonresponsive. Any ideas? Are there limits beyond which we should not push those parameters

    • @LeeMinardi
      @LeeMinardi  Год назад

      Hi Barry, I'm glad you found the program useful. It's possible to create 4 bar linkages where the crank cannot rotate 360 degrees. Could that be the issue? What were the dimensions for the linkage that caused the program to crash? Please state: the distance between the pivots, the length of the crank located at one of the pivots, the length of the link connected to the other pivot and the length of the couple link.

  • @carlsoltau3627
    @carlsoltau3627 4 месяца назад

    How can I connect the lines with the object itself. When I merge the moving lines, the object does not move?

    • @LeeMinardi
      @LeeMinardi  4 месяца назад

      As noted in the tutorial each link is a block. Are you familiar with AutoCAD blocks? Each of the blocks have a line on the xy plane whose ends are referenced when applyng the coincident constraint. The 3D solid part of the link is a solid object on a different layer of the same block as the lines. Since the reference lines are part of the same block as the "object" they move together.
      Please let me know if you require further explanation with specifics about what is unclear.

  • @manzidankelly3874
    @manzidankelly3874 Год назад

    Hey. For the AnimateRotation programme what sofiware do you have to use? Or it is just a notepad?

    • @LeeMinardi
      @LeeMinardi  Год назад

      In AutoCAD go to the Manage tab then click Visual LISP Editor, File, New File and type in the program. Save the file as AnimateRotation (.scr will be appended automatically).
      Click Tools, Load text in Editor or give the Script command in AutoCAD to load the program. After it is loaded you can run the AnimateRotation command like any other command.

  • @bogest76
    @bogest76 4 года назад

    Thank you Sir!

  • @ymautomation3983
    @ymautomation3983 2 года назад

    Thank you 💕💕💕💕 boss

  • @mohsin160
    @mohsin160 5 лет назад

    Hello,
    The bars you made are blocks or you simply used press pull to get the bars?
    Regards

    • @LeeMinardi
      @LeeMinardi  5 лет назад +1

      AutoCAD’s parametric features can only reference point, lines, arcs, circles, and splines on a 2D plane. It cannot reference solids. I therefore created the links as individual block objects. Each block includes lines on the XY plane and, on a separate layer, a solid representation of the link (0:20 in video). When adding a coincident parametric constraint the line ends in the block are referenced.
      The solid objects that are in a block were created by making a 2D outline drawing of the link with circles (holes) for the “pivot” points (the center of the holes line up with the ends of the lines). The 2D shape of the link was created by converting the outline and holes to regions and then subtracting the holes. The resulting region was then extruded into a solid.

    • @mohsin160
      @mohsin160 5 лет назад

      If possible, can you share the CAD file in which you are working....?

    • @LeeMinardi
      @LeeMinardi  5 лет назад

      @@mohsin160 I've posted it on the AutoCAD forum in response to your original post.

  • @DorinHirte
    @DorinHirte 4 года назад

    can you make small video, how you link the lines to solids, ore this seams to by the only missing info. couple of seconds for the video beginning

  • @tabrejkhan6592
    @tabrejkhan6592 11 месяцев назад

    nice

  • @bruce13ish
    @bruce13ish 5 лет назад

    I'm trying apply constraints to prove how a set of joints will operate.
    I have 2 lines, both at 0 on the Z axis, and I have the ucs positioned on one of the lines. When I try to apply a coincident restraint I'm getting the following messages.
    GCCOINCIDENT
    Select first point or [Object/Autoconstrain] :
    Select second point or [Object] :
    The constraint cannot be applied. The two objects must reside in the same plane.
    Can you suggest a solution?

    • @LeeMinardi
      @LeeMinardi  5 лет назад

      First, set the UCS to World
      UCS [Enter][Enter]
      Give the list command and select the first line and check that the z coordinate for both ends are = 0.0
      Do the same for the other line. This will validate that the two lines lie on the z = 0 plane (not axis as you state).
      If you want to work with two lines that are on the same plane but the plane is skewed in space then set the UCS such that the XY plane of the UCS contains the two lines.

  • @AC3DCad
    @AC3DCad 5 лет назад

    could you pls do more animation in autocad . By the way, thanks for this video

    • @LeeMinardi
      @LeeMinardi  5 лет назад

      You are welcome AC 3DCad. What kind of AutoCAD animation would you like to see? Unlike 3ds Max where I do most of my animations, AutoCAD is quite limited but there are workarounds.

    • @pratikraut8005
      @pratikraut8005 3 года назад

      ​@@LeeMinardiwheels rotating on a circular track

  • @RickyVg7
    @RickyVg7 2 года назад

    Hi! When I try to do the "Coincident" part, only the line moves to the fixed point but the solid remains on its position. What am I doing wrong? :c

    • @LeeMinardi
      @LeeMinardi  2 года назад +2

      Each link is an AutoCAD BLOCK with a solid object on one layer and a line on another layer. The line is referenced for applying the coincident constraint. I mention this at 0:16 in the video. Since the line and the solid are components of the same block they will move together. Does this answer your question?

    • @RickyVg7
      @RickyVg7 2 года назад

      @@LeeMinardi YES! Thank you. I didn't know what a BLOCK was hahaha I appreciate it ;)

    • @py.engineering
      @py.engineering 2 года назад

      @@LeeMinardi But, do you have a video to learn how to link a solid with a line. Even if they are circles with some kind or rounded solids, how can I know how? Please, help me!

  • @arfatahmed9019
    @arfatahmed9019 4 года назад

    how you converted these
    lines into solid part

    • @LeeMinardi
      @LeeMinardi  4 года назад +1

      Each link in the mechanism is a separate AutoCAD block that contains a line on the xy plane and a solid model representation of the link on a separate layer of the block.
      Are you asking how to create solid objects in AutoCAD?

  • @royalbertbernal6901
    @royalbertbernal6901 4 года назад

    ANIMATEROTATION is unknown command? How can i use that on autocad2015? Thanks IDOL! LODI!

    • @LeeMinardi
      @LeeMinardi  4 года назад

      animaterotation is a vlisp program. You must load it before using it. Below is a listing for the program that is shown at the end of the video. Save this program as a text file with the filename extension .lsp. In AutoCAD give the command _appload and then you will be able to give the command animaterotation.
      (defun c:animaterotation (/ ctr AngStep d gname nSteps i)
      ; L. Minardi 1/11/2018 v1.0
      ; Animates a group about a specified point. User may specify:
      ; - center point of rotation
      ; - group name
      ; - rotation angle step size
      ; - delay factor for each step
      ; - number of steps in the animation
      (setq ctr (getpoint "
      Indicate center of rotation."))
      (setq AngStep (getreal "
      Enter angle step size (10): "))
      (if (= AngStep nil) (setq AngStep 10))
      (setq d (getint "
      Enter delay factor (100): "))
      (if (= d nil) (setq d 100))
      (setq gname (getstring "
      Enter group name (g1): "))
      (if (= gname "") (setq gname "g1"))
      (setq nSteps (getint "
      Enter number of steps (20): "))
      (if (= nSteps nil) (setq nSteps 20))
      (setvar "CMDECHO" 0)
      (setq i 0 )
      (while (< i nSteps)
      (command "rotate" "g" gname "" ctr AngStep nSteps)
      (setq i (1+ i))
      (command "delay" d)
      ) ; end while
      (setvar "CMDECHO" 1)
      (princ)
      ) ; end defun

    • @andrewmerafuentes6683
      @andrewmerafuentes6683 4 года назад

      Please enlighten me the steps to load this program. How do I save it, which directory to save it? I badly need this. Please help.

    • @andrewmerafuentes6683
      @andrewmerafuentes6683 4 года назад

      Successfully loaded it. Thanks.

  • @jagadeshsan7480
    @jagadeshsan7480 4 года назад

    Is it possible to rotate chain and gears sir?

    • @LeeMinardi
      @LeeMinardi  4 года назад

      A chain wrapped around a gear like on a bicycle would be difficult as each individual link of the chain would need to be animated individually. A few gears could be done.

  • @danyCD17
    @danyCD17 5 лет назад

    How did you make the bars attach on top of one another?

    • @LeeMinardi
      @LeeMinardi  5 лет назад +1

      Each block of the different bars of the mechanism has a line on the xy plane that was used for applying the coincident constraint. The solid objects of the bars was created at different z values so that the bars do not interfere with each other. The bottom of the solid objects for the crank and follower have a z value of 0 while the coupler has a z value equal to the thickness of the bars. The pivots are just below the xy plane. I mention this at 0:34 in the video.

    • @danyCD17
      @danyCD17 5 лет назад

      @@LeeMinardi oh, I get it now, thanks for the fast response

  • @frdriiic
    @frdriiic 2 года назад

    Is this possible to get the lsp file to do this rotation?

    • @LeeMinardi
      @LeeMinardi  2 года назад

      I've added a listing of the program to the description paragraph. Before using it be sure to make the noted change for the "less than" symbol.

    • @frdriiic
      @frdriiic 2 года назад

      @@LeeMinardi Thanks a lot!

  • @virenramchandani6113
    @virenramchandani6113 6 лет назад

    how did you attach a line to a object in Autocad ??? ref : 0:25

    • @LeeMinardi
      @LeeMinardi  6 лет назад +1

      I created a different block for each of the links and the pivot. The lines you see at 0:25 are part of the blocks but on a different layer. The lines are all on the zero XY plane (Z=0) to ensure a planar mechanism. If all your geometry were 2D the lines would not be necessary as you could add the coincident constraint between links by snapping to the center of the circles that define the link ends.

    • @virenramchandani6113
      @virenramchandani6113 6 лет назад

      Lee Minardi thank you !!! 👍👍

    • @dwaraganathanrengasamy6169
      @dwaraganathanrengasamy6169 4 года назад

      @@LeeMinardi I have a solid and a line. How to apply constrain to them.. like you did. I am unable to lock them together. Please reply early and help me finish my project🥺

    • @LeeMinardi
      @LeeMinardi  4 года назад +1

      @@dwaraganathanrengasamy6169 The line and solid for each link are part of the same block as explained at about 20 seconds into the video. The lines for each block lie on the XY plane (z = 0). The solid component of the block lies above or below the Z = 0 plane. The lines and solids are on different layer. Parametric constraints only work in 2D. You are really constraining the lines of the blocks not the solids. The solid object are there to make the final mechanism look good!
      I hope this answers your question. Good luck!

    • @andrewmerafuentes6683
      @andrewmerafuentes6683 4 года назад

      Thanks.