- (defun c:tt ( / a b of p1 p2 p3 p4)
- (setq of (getreal "\n输入偏移距离:"))
- (while (setq a (car (entsel "\n选择偏移的直线:")))
- (setq p1 (cdr (assoc 10 (entget a)))
- p2 (cdr (assoc 11 (entget a)))
- )
- (command "offset" of a pause "")
- (setq b (entlast)
- p3 (cdr (assoc 10 (entget b)))
- p4 (cdr (assoc 11 (entget b)))
- )
- (if (equal (distance p1 p3) of 1e-6)
- (progn
- (entmake (list '(0 . "LINE") (cons 10 p1) (cons 11 p3)))
- (entmake (list '(0 . "LINE") (cons 10 p2) (cons 11 p4)))
- )
- (progn
- (entmake (list '(0 . "LINE") (cons 10 p1) (cons 11 p4)))
- (entmake (list '(0 . "LINE") (cons 10 p2) (cons 11 p3)))
- )
- )
- )
- )
|