2009年4月8日 星期三

ETCIR

(defun C:ETCIR(/ EC1 EC2 TCC TCR Rt CIR DX DY)
(setvar "BLIPMODE" 0)
(setq EC1 (Osnap (getpoint "\nSelect existing circle ...") "nea"))

(setq EC2 (Osnap EC1 "center"))
(setq TCR (getdist EC1 "\n Enter Tangent Circle Radius :"))
(setvar "AUNITS" 0)
(setq Rt (getangle EC2 "\nEnter direct angle :"))
(setq CIR (distance EC1 EC2))
(setq DX (* (+ CIR TCR) (cos Rt)))
(setq DY (* (+ CIR TCR) (sin Rt)))
(setq TCC (list (+ (car EC2) DX) (+ (cadr EC2) DY)))
(command "Circle" TCC TCR)
)

沒有留言: