[求助]有两个问题要请教高手(lsp现在不能用了)
1-交点打断,以前很好用的命令,现在加载后 用不了了(defun c:ee ()<BR> (prompt "\n请选取交点打断的曲线<全选>:")<BR> (if (not (setq ss (ssget '((0 . "*line,arc,circle,ellipse")))))<BR> (setq ss (ssget "x" '((0 . "*line,arc,circle,ellipse"))))<BR> )<BR> (setq num (xdrx_curve_intersectbreak ss))<BR> (prompt (strcat "\n处理了 " (itoa (sslength ss)) " 个曲线实体,发现交点 "<BR> (itoa num) " 个!"<BR> )<BR> )<BR> (princ)<BR>)<BR>2--裁剪矩形框内的线,就是点击矩形框,就 回自动剪断框内的直线
(defun c:tt<BR>(/ rect e0 e1 pt x ptx pty l1 i p1 p2 p1x p1y point count)<BR>(setvar "osmode" 0)<BR>(setq l1 nil)<BR>(setq i 0)<BR>(setq rect (car (entsel "\n请选择需剪切的矩形:")))<BR>(setq e0 (entget rect))<BR>(while (setq x (nth i e0))<BR>(if (= (car x) 10)<BR>(progn<BR>(setq ptx (nth 1 x))<BR>(setq pty (nth 2 x))<BR>(setq x (list ptx pty))<BR>(setq l1 (cons x l1))<BR>)<BR>)<BR>(setq i (1+ i))<BR>)<BR>(reverse l1)<BR>(setq p1 (car l1))<BR>(setq p1x (nth 0 p1))<BR>(setq p1y (nth 1 p1))<BR>(setq count 0)<BR>(repeat 3<BR>(setq count (+ count 1))<BR>(setq pt (nth count l1))<BR>(setq ptx (nth 0 pt))<BR>(setq pty (nth 1 pt))<BR>(setq point (mapcar '+ p1 pt))<BR>(setq point (mapcar '/ point '(2.0 2.0 2.0)))<BR>(if<BR>(and (/= (nth 0 point) p1x)<BR>(/= (nth 0 point) ptx)<BR>(/= (nth 1 point) p1y)<BR>(/= (nth 1 point) pty)<BR>)<BR>(setq p point)<BR>)<BR>)<BR>(setq l1 nil)<BR>(command "offset" 5 rect p "")<BR>(setq e0 (entlast))<BR>(setq e1 (entget e0))<BR>(princ e1)<BR>(setq i 0)<BR>(while (setq x (nth i e1))<BR>(if (= (car x) 10)<BR>(progn<BR>(setq ptx (nth 1 x))<BR>(setq pty (nth 2 x))<BR>(setq x (list ptx pty))<BR>(setq l1 (cons x l1))<BR>)<BR>)<BR>(setq i (1+ i))<BR>)<BR>(reverse l1)<BR>(setq p1 (car l1))<BR>(setq p2 p1)<BR>(command "erase" e0 "")<BR>(setq count 0)<BR>(repeat 3<BR>(setq count (+ count 1))<BR>(setq pt (nth count l1))<BR>(command "trim" rect "" "f" p1 pt "" "")<BR>(setq p1 pt)<BR>)<BR>(command "trim" rect "" "f" p1 p2 "" "")<BR>(setvar "osmode" 687)<BR>)<BR>
高手帮我看看这两个 lsp怎么 现在不能用了? TT很好用啊,EE是不能用,xdrx_curve_intersectbreak是什么呢,所有的帮助文件里似没有找到这个函数,是不支持了吧? 本帖最后由 作者 于 2004-5-31 21:02:43 编辑
我 就是不懂,才贴出来让大家看看,我很菜,也是以前找朋友给编的,自己不会什么程序,只知道使用,斑竹能否帮忙看看。
tt有时候也用不好,有时候把矩形外面的线给剪了,而里面又保留,不知道怎么回事,ee以前都 能用,怎么 现在又不能了?
恩,楼下的提醒了我,果然是这个问题,以前用得上晓东工具,现在用不上了,他与天正不兼容。只有舍弃这个东西 ,斑竹能否给帮忙编辑个程序,我就不用在申请那个版本再多发个帖子 了 xdrx_curve_intersectbreak 可能是 晓东的函数,只有加载他的函数,才能使用. tt真好用,我是CAD2008 ,要不你也试试 TT确实好用。而EE怎么用呀。
页:
[1]