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 KZitem 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)
)
Негізгі бет Tutorial: Modeling and Animating a 4-bar Linkage with AutoCAD
No video
Пікірлер: 56