[原创][LISP]两垂直线倒内直角
;========================<BR>;两垂直线倒内直角<BR>;2004.6.5 ljc<BR>;========================<BR>(defun c:dj( / l ll p1)<BR> (setq cm(getvar "cmdecho") os(getvar "osmode")) <BR> (setvar "cmdecho" 0)<BR> (setq l(car (nentsel "请选择直线1")) h1(getdist "线1切割值:")<BR> ll(car (nentsel "请选择直线2")) h2(getdist "线2切割值:") )<BR> (setq p1 (inters (cdr (assoc 10 (entget l))) (cdr (assoc 11 (entget l)))<BR> (cdr (assoc 10 (entget ll))) (cdr (assoc 11 (entget ll))) nil))<BR> (command "_chamfer" "d" h1 h2) (command)<BR> (command "_chamfer" l ll)<BR> (setq line(entlast))<BR> (setvar "osmode" 0) <BR> (command "rectang" (cdr (assoc 10 (entget line))) <BR> (cdr (assoc 11 (entget line))) )<BR> (command "trim" line "" p1 "") <BR> (setvar "osmode" os)<BR> (command "erase" line "")<BR> (command "explode" (entlast) )<BR> (setvar "cmdecho" cm) (print)<BR> )<BR> 呵呵,ljcgq 回答我的求助源码被放到这里了.还有奖励,恭喜! 做記號!!晚點研究!!
页:
[1]