net 怎样 调用 下面 的lisp
我有一个切正矩形的程请高手帮我改一下,改成选一任意矩形切图程序(defun c:wSave(/ pzx pys p1 p2 p3 p4 s s1)
(setq pzx (getpoint "\n选择左下角点(用鼠标直接点取或在命令行输入<x,y>):"))
(setq pys (getpoint "\n选择右上角点(用鼠标直接点取或在命令行输入<x,y>):"))
(setq p1 (list (- (car pzx) 0.01) (- (cadr pzx) 0.01)))
(setq p2 (list (+ (car pys) 0.01) (- (cadr pzx) 0.01)))
(setq p3 (list (+ (car pys) 0.01) (+ (cadr pys) 0.01)))
(setq p4 (list (- (car pzx) 0.01) (+ (cadr pys) 0.01)))
(command "rectang" pzx pys)
(setq s (ssget "L"))
(command "trim" s "" "F" p1 p2 "" "F" p2 p3 "" "F" p3 p4 "" "F" p4 p1 "" "")
(command "erase" s "")
(setq s1 (ssget "WP" (list p1 p2 p3 p4 p1)))
(rder s1)
(setq s nil s1 nil)
(setvar "FILEDIA" 0)
(command "SaveAs" "" "d:\\test" "close" "n")
(setvar "FILEDIA" 1)
(princ)
);end wSave
(defun rder(s1 / s2 ent s3 n)
(setq s2 (ssget "X"))
(if (not s1) (command "erase" s2 "")
(progn
(setq s3 (ssadd) n 0)
(repeat (sslength s2)
(setq ent (ssname s2 n))
(if (not (ssmemb ent s1))
(ssadd ent s3)
)
(setq n (1+ n))
)
(command "erase" s3 "" "redraw")
)
)
);end rder
你是要问net调用lisp还是要问怎么改成选一任意矩形切图程序? 关于“net 怎样调用isp” 可看站长的帖子
但lisp中如果有(command)函数,可能就不行了
页:
[1]