(defun c:lpbusha()
(setq F (getvar "blipmode")) (setvar "blipmode" 0)
(setq p (getpoint "Insert point:"))
(setq D (getreal "\n Enter diameter [16] [20] [25] [30] [35] [40] [50] [60]:"))
(setq L (getreal "Enter lpbusha length:"))
(setq A (getreal "Enter lpbusha angle:"))
(setq B (* pi (/ A 180)))
(if (= D 16)
 (progn
  (setq D1 25.0)
  (setq D2 30.0)
  (setq H 6.0)
 )
)
(if (= D 20)
 (progn
  (setq D1 30.0)
  (setq D2 35.0)
  (setq H 8.0)
 )
)
(if (= D 25)
 (progn
  (setq D1 35.0)
  (setq D2 40.0)
  (setq H 8.0)
 )
)
(if (= D 30)
 (progn
  (setq D1 42.0)
  (setq D2 47.0)
  (setq H 10.0)
 )
)
(if (= D 35)
 (progn
  (setq D1 48.0)
  (setq D2 54.0)
  (setq H 10.0)
 )
)
(if (= D 40)
 (progn
  (setq D1 55.0)
  (setq D2 61.0)
  (setq H 10.0)
 )
)
(if (= D 50)
 (progn
  (setq D1 70.0)
  (setq D2 76.0)
  (setq H 12.0)
 )
)
(if (= D 60)
 (progn
  (setq D1 80.0)
  (setq D2 86.0)
  (setq H 12.0)
 )
)
(if (> L D) (setq L1 D) (setq L1 L))
(setq p1 (polar p B L))
(setq p2 (polar p1 (+ B pi) H))
(setq p3 (polar p B L1))
(setq p4 (polar p (- B (/ pi 2)) (+ (/ D 2) 1)))
(setq p13 (polar p (- B (/ pi 2)) (- (/ D1 2) 1)))
(setq p14 (polar p (+ B (/ pi 2)) (+ (/ D 2) 1)))
(setq p23 (polar p (+ B (/ pi 2)) (- (/ D1 2) 1)))
(setq p22 (polar p23 (+ B (/ pi 4)) (sqrt 2)))
(setq p5 (polar p4 (+ B (/ pi 4)) (sqrt 2)))
(setq p12 (polar p13 (- B (/ pi 4)) (sqrt 2)))
(setq p15 (polar p14 (- B (/ pi 4)) (sqrt 2)))
(setq p6 (polar p3 (- B (/ pi 2)) (/ D 2)))
(setq p16 (polar p3 (+ B (/ pi 2)) (/ D 2)))
(setq p17 (polar p16 (+ B (/ pi 2)) 0.5))
(setq p7 (polar p6 (- B (/ pi 2)) 0.5))
(setq p11 (polar p2 (- B (/ pi 2)) (/ D1 2)))
(setq p21 (polar p2 (+ B (/ pi 2)) (/ D1 2)))
(setq p20 (polar p2 (+ B (/ pi 2)) (/ D2 2)))
(setq p10 (polar p2 (- B (/ pi 2)) (/ D2 2)))
(setq p9 (polar p1 (- B (/ pi 2)) (/ D2 2)))
(setq p19 (polar p1 (+ B (/ pi 2)) (/ D2 2)))
(setq p18 (polar p17 B (- L L1)))
(setq p8 (polar p7 B (- L L1)))
(command "line" p9 p10 p11 p12 p13 "")
(command "line" p23 p22 p21 p20 p19 "")
(if (> L D)
 (progn
  (command "line" p18 p17 p16 p15 p14 "")
  (command "line" p4 p5 p6 p7 p8 "")
 )
 (progn
  (command "line" p16 p15 p14 "")
  (command "line" p4 p5 p6 "")))
(setvar "blipmode" F))
