(defun C:ARCH (/ os pa pb h xa ya xb yb r xL a) (setq os (getvar "osmode")) (setvar "osmode" 32) (setq pa (getpoint "\n duan dian 端点:")) (setq pb (getpoint "\n yuan xin 圆心:")) (setq h (getreal "\n hu chang 弧长:")) (setq xa (car pa) ya (cadr pa)) (setq xb (car pb) yb (cadr pb)) (setq r (sqrt (+ (* (- xa xb) (- xa xb)) (* (- ya yb) (- ya yb))))) ;(setq xL (* 2 r (sin (/ h (* 2 r))))) (setq a (* (/ h r) (/ 180 pi))) (setvar "osmode" os) ;(command "arc" pa "c" pb "L" xL) (command "arc" pa "c" pb "A" a) )