;;不好意思未考虑坐标系转换 (defun c:tt (/ e1 e2 ins) (if (and (setq e1 (entsel "\n选择第一条直线: ")) (setq e2 (entsel "\n选择第二条直线: ")) ) (progn (setq e1 (entget (car e1))) (setq e2 (entget (car e2))) (setq ins (inters (cdr (assoc 10 e1)) (cdr (assoc 11 e1)) (cdr (assoc 10 e2)) (cdr (assoc 11 e2)) nil ) ) (if (zerop (getvar "worlducs")) (setq ins (trans ins 0 1)) ) (command "_.ucs" "_new" "_non" ins) ) ) (princ) ) |