;------rtod------
(defun rtod (x)
  (* 180.0 (/ x pi))
)
;------dtor------
(defun dtor (x)
  (* pi (/ x 180.0))
)
;------spp.lsp----
(defun C:spp ()
(redraw)
(setq p (getpoint "\nPlease insert point:"))
(setq L1 (getdist p "\nPlease enter end point:"))
(setq A (getreal "\nPlease enter the stop pin locating angle:"))
(setq B (dtor A))
(setq d 16 d1 8 M 15 N 5 L 2  c 0.5)
(setq p1 (polar p B N))
(setq p2 (polar p (- B pi)(- M N)))
(setq p3 (polar p B (- N c)))
(setq p4 (polar P (- B pi)(- M N c)))
(setq p24 (polar p (- B pi) L1))
(setq p5 (polar p (- B pi) L))
(setq p6 (polar p1 (- B (/ pi 2))(- (/ d 2) c)))
(setq p7 (polar p1 (+ B (/ pi 2))(- (/ d 2) c)))
(setq p8 (polar p3 (- B (/ pi 2))(/ d 2)))
(setq p9 (polar p3 (+ B (/ pi 2))(/ d 2)))
(setq p10 (polar p (- B (/ pi 2))(/ d 2)))
(setq p11 (polar p (+ B (/ pi 2))(/ d 2)))
(setq p12 (polar p (- B (/ pi 2))(/ d1 2)))
(setq p13 (polar p (+ B (/ pi 2))(/ d1 2)))
(setq p14 (polar p (- B (/ pi 2))(- (/ d1 2) c)))
(setq p15 (polar p (+ B (/ pi 2))(- (/ d1 2) c)))
(setq p16 (polar p5 (- B (/ pi 2))(/ d1 2)))
(setq p17 (polar p5 (+ B (/ pi 2))(/ d1 2)))
(setq p18 (polar p5 (- B (/ pi 2))(- (/ d1 2) c)))
(setq p19 (polar p5 (+ B (/ pi 2))(- (/ d1 2) c)))
(setq p20 (polar p4 (- B (/ pi 2))(/ d1 2)))
(setq p21 (polar p4 (+ B (/ pi 2))(/ d1 2)))
(setq p22 (polar p2 (- B (/ pi 2))(- (/ d1 2) c)))
(setq p23 (polar p2 (+ B (/ pi 2))(- (/ d1 2) c)))
(setq p25 (polar p24 (- B (/ pi 2))(/ d1 2)))
(setq p26 (polar p24 (+ B (/ pi 2))(/ d1 2)))
(command "break" p11 p10 "")
(command "line" p7 p9 p11 p15 p19 p17 p21 p23 p22 p20
p16 p18 p14 p10 p8 p6 "")
(command "line" p9 p8 "")
(command "line" p21 p20 "")
(command "line" p18 p19 "")
(command "line" p15 p19 "")
(command "line" p14 p18 "")
(command "line" p12 p16 "")
(command "line" p13 p17 "")
(command "line" p15 p14 "")
(command "line" p20 p25 "")
(command "line" p21 p26 "")
)





