这是Z版的
- ;方框圆弧清角 明经 ZZXXQQ 2009.7.19
- (defun c:tt ()
- (setvar "CMDECHO" 0)
- (setq oldos (getvar "OSMODE"))
- (if (and (setq r (getdist "\n圆弧半径 :"))
- (princ "\n选择方框 :")
- (setq ss (ssget ":S" '((0 . "LWPOLYLINE") (70 . 1))))) (progn
- (setq en (ssname ss 0) ent (entget en))
- (if (= (cdr(assoc 90 ent)) 4) (progn
- (setq ptl (list))
- (foreach n ent (if (= (car N) 10) (setq ptl (cons (cdr n) ptl))))
- (setq ptl (reverse ptl))
- (setq p1 (car ptl) p2 (cadr ptl) p3 (caddr ptl) p4 (last ptl))
- (command "circle" p1 r) (setq e1 (entlast))
- (command "circle" p2 r) (setq e2 (entlast))
- (command "circle" p3 r) (setq e3 (entlast))
- (command "circle" p4 r) (setq e4 (entlast))
- (command "trim" e1 e2 e3 e4 "" "f" p1 p3 "" "f" p1 p3 "" "f" p2 p4 "" "f" p2 p4 "" "")
- (setq ss (ssget "W" p1 p3))
- (command "trim" ss "" "f" p1 p3 "" "f" p2 p4 "" "")
- ))
- ))
- (setvar "OSMODE" oldos)
- (setvar "CMDECHO" 1)
- (princ)
- )
|