- 积分
- 2883
- 明经币
- 个
- 注册时间
- 2003-7-17
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|
1-交点打断,以前很好用的命令,现在加载后 用不了了
(defun c:ee () (prompt "\n请选取交点打断的曲线<全选>:") (if (not (setq ss (ssget '((0 . "*line,arc,circle,ellipse"))))) (setq ss (ssget "x" '((0 . "*line,arc,circle,ellipse")))) ) (setq num (xdrx_curve_intersectbreak ss)) (prompt (strcat "\n处理了 " (itoa (sslength ss)) " 个曲线实体,发现交点 " (itoa num) " 个!" ) ) (princ) ) 2--裁剪矩形框内的线,就是点击矩形框,就 回自动剪断框内的直线
(defun c:tt (/ rect e0 e1 pt x ptx pty l1 i p1 p2 p1x p1y point count) (setvar "osmode" 0) (setq l1 nil) (setq i 0) (setq rect (car (entsel "\n请选择需剪切的矩形:"))) (setq e0 (entget rect)) (while (setq x (nth i e0)) (if (= (car x) 10) (progn (setq ptx (nth 1 x)) (setq pty (nth 2 x)) (setq x (list ptx pty)) (setq l1 (cons x l1)) ) ) (setq i (1+ i)) ) (reverse l1) (setq p1 (car l1)) (setq p1x (nth 0 p1)) (setq p1y (nth 1 p1)) (setq count 0) (repeat 3 (setq count (+ count 1)) (setq pt (nth count l1)) (setq ptx (nth 0 pt)) (setq pty (nth 1 pt)) (setq point (mapcar '+ p1 pt)) (setq point (mapcar '/ point '(2.0 2.0 2.0))) (if (and (/= (nth 0 point) p1x) (/= (nth 0 point) ptx) (/= (nth 1 point) p1y) (/= (nth 1 point) pty) ) (setq p point) ) ) (setq l1 nil) (command "offset" 5 rect p "") (setq e0 (entlast)) (setq e1 (entget e0)) (princ e1) (setq i 0) (while (setq x (nth i e1)) (if (= (car x) 10) (progn (setq ptx (nth 1 x)) (setq pty (nth 2 x)) (setq x (list ptx pty)) (setq l1 (cons x l1)) ) ) (setq i (1+ i)) ) (reverse l1) (setq p1 (car l1)) (setq p2 p1) (command "erase" e0 "") (setq count 0) (repeat 3 (setq count (+ count 1)) (setq pt (nth count l1)) (command "trim" rect "" "f" p1 pt "" "") (setq p1 pt) ) (command "trim" rect "" "f" p1 p2 "" "") (setvar "osmode" 687) )
高手帮我看看这两个 lsp怎么 现在不能用了? |
|