对于线路,来自John Uhden
- ;;-----------------------------------------------
- ;; SSGETENDS.LSP (c)2002, John F. Uhden, Cadlantic
- ;; Function to create a selection set of Lines
- ;; within a fuzz distance of either end of a Line
- ;; given the 'ENAME of the selected line and the
- ;; fuzz distance as a real or integer.
- ;; Dedicated to Bill Zondlo c.02-04-02
- ;;
- (defun ssgetends (e fuzz / ent p10 p11 ss)
- (and
- (= (type e) 'ENAME)
- (numberp fuzz)
- (>= fuzz 0)
- (setq ent (entget e))
- (= (cdr (assoc 0 ent)) "LINE")
- (setq p10 (cdr (assoc 10 ent)))
- (setq p11 (cdr (assoc 11 ent)))
- (setq fuzz (list fuzz fuzz fuzz))
- (setq ss
- (ssget "X"
- (list
- '(0 . "LINE")
- '(-4 . "<OR")
- '(-4 . "<AND")
- '(-4 . ">=,>=,>=")
- (cons 10 (mapcar '- p10 fuzz))
- '(-4 . "<=,<=,<=")
- (cons 10 (mapcar '+ p10 fuzz))
- '(-4 . "AND>")
- '(-4 . "<AND")
- '(-4 . ">=,>=,>=")
- (cons 10 (mapcar '- p11 fuzz))
- '(-4 . "<=,<=,<=")
- (cons 10 (mapcar '+ p11 fuzz))
- '(-4 . "AND>")
- '(-4 . "<AND")
- '(-4 . ">=,>=,>=")
- (cons 11 (mapcar '- p10 fuzz))
- '(-4 . "<=,<=,<=")
- (cons 11 (mapcar '+ p10 fuzz))
- '(-4 . "AND>")
- '(-4 . "<AND")
- '(-4 . ">=,>=,>=")
- (cons 11 (mapcar '- p11 fuzz))
- '(-4 . "<=,<=,<=")
- (cons 11 (mapcar '+ p11 fuzz))
- '(-4 . "AND>")
- '(-4 . "OR>")
- )
- )
|