- (defun c:cc ();删除多边形外图元
- (setq en (entsel))
- (setq ss1 (ssget '((0 . "*line") (8 . "beam,edote"))))
- (setq ent (entget(car en)))
- (if (and
- (= (cdr(assoc 0 ent)) "LWPOLYLINE")
- (= (cdr(assoc 70 ent)) 1)
- ) (progn
- (setq pts '())
- (foreach x ent (if (= (car x) 10)(setq pts (cons (cdr x) pts))))
- (reverse pts)
- (setq pts (mapcar '(lambda (x) (trans x 0 1)) pts))
- ; (ucs)
- (setq ss2 (ssget "WP" pts '((0 . "*line") (8 . "beam,edote"))))
- ))
- (command "erase" ss1 "R" ss2 "")
- (princ)
- )
|