求助,哪位高手有多条线段一键相交,自动裁剪的插件?
请问各位高手有多条线段一键相交,自动裁剪的插件,就是两条线段一键相交,合并为一条线段,并把多余的部分裁剪了就比如让左边的线段,变成右边这样的插件
;;; 用模糊距离连接线,弧和多义线
(defun c:tt ()
(setq oldcmdecho (getvar "cmdecho"))
(setq oldpeditaccept (getvar "PEDITACCEPT"))
(setvar "cmdecho" 0)
(setq A2k4 (>= (substr (getvar "ACADVER") 1 2) "16"))
(if A2k4 (setvar "PEDITACCEPT" 0))
(setqokObjects '((0 . "LINE,ARC,POLYLINE,LWPOLYLINE")))
(princ "\nSelect object to join: ")
(setq ss1 (ssget okObjects))
(setq fuzz (getdist "\nFuzz distance <0>: "))
(if (= fuzz nil) (setq fuzz 0))
(if (/= ss1 nil)
(progn
(setq objType (cdr (assoc 0 (entget (setq entLine (ssname ss1 0))))))
(if (= (sslength ss1) 1) (setq ss1 (ssget "X" okObjects)))
(if (member objType '("LINE" "ARC"))
(command "_.pedit" "_M" ss1 "" "_Y" "_J" "_J" "_B" fuzz "")
(command "_.pedit" "_M" ss1 "" "_J" "_J" "_B" fuzz "")
)
)
)
(setq ss1 nil)
(setvar "cmdecho" oldcmdecho)
(if A2k4 (setvar "PEDITACCEPT" oldpeditaccept))
(princ)
) 不错的帖子顶一下
页:
[1]