(DEFUN C:KOS()
(setq F(getvar "blipmode")) (setvar "blipmode" 0)
(SETQ LY (GETVAR "CLAYER"))
(setq T(getreal "Enter plate thickness:"))
(setq D(getreal "Enter KO diameter:"))
(setq P(getpoint "Enter insert point:"))
(setq P1(polar P (/ pi 2) 1))
(setq P2(polar P (/ pi 2) T))
(setq P3(polar P2 (/ pi 2) -1))
(setq P4(polar P1 pi (- (* 0.5 D) 1)))
(setq P5(polar P1 0 (- (* 0.5 D) 1)))
(setq P6(polar P3 0 (- (* 0.5 D) 1)))
(setq P7(polar P3 pi (- (* 0.5 D) 1)))
(setq P8(polar P2 pi (* 0.5 D)))
(setq P9(polar P2 0 (* 0.5 D)))
(setq P10(polar P 0 (* 0.5 D)))
(setq P11(polar P pi (* 0.5 D)))
(COMMAND "LAYER" "SET" "DRAW" "")
(command "line" p8 p7 p6 p9 "")
(command "line" p10 p5 p4 p11 "")
(command "line" p4 p7 "")
(command "line" p6 p5 "")
(setvar "blipmode" F)
(COMMAND "LAYER" "SET" LY "")
)
