 - (defun C:MyDrawRad (/ E H L P1 P2 PM R S)
- (setq L (getreal " >>输入弧长:"))
- (setq H (getreal " >输入弦高:"))
- (setq R (getradius L H))
- (setq s (* (sin (/ (* L 0.5) R)) R))
- ;;(polar pt ang dist)
- (setq p1 (list s 0))
- (setq p2 (list (- s) 0))
- (setq pm (list 0 H))
- (command "_.arc" p2 pm p1)
- (setq e (entlast))
- (command "_.move" e "" '(0 0) pause)
- (princ)
- )
|