;试试看- (defun c:tt ()
- (setvar "CMDECHO" 0)
- (setq oldos (getvar "OSMODE"))
- (setvar "OSMODE" 0)
- (if (and (setq s1 (entsel "\n选择圆弧 :"))
- (setq en (car s1))
- (setq ent (entget en))
- (= (cdr(assoc 0 ent)) "ARC")
- ) (progn
- (setq pc (cdr(assoc 10 ent))
- r (cdr(assoc 40 ent))
- st (cdr(assoc 50 ent))
- ed (cdr(assoc 51 ent))
- ps (polar pc st r)
- pe (polar pc ed r)
- pm (osnap (cadr s1) "MID")
- ang (angle pm pc)
- pn (polar pm ang 0.5))
- (command "erase" en "")
- (command "circle" "3p" "tan" ps pn "tan" pe)
- (command "trim" "" "f" pc (polar pc ang (+ r r)) "" "")
- ))
- (setvar "OSMODE" oldos)
- (setvar "CMDECHO" 1)
- (princ)
- )
|