 - ;; xbjq(选边剪切) 需要e派工具箱(xcad.vlx)的支持:http://xyp1964.ys168.com
- (defun c:xbjq (/ s1 p2 p3 s2 ptn pt)
- (CMDLA0)
- (setvar "osmode" 0)
- (if (and (setq s1 (car (entsel "\n选择剪切边界: ")))
- (xyp-curve-check s1)
- (setq p2 (xyp-get-CurveMidPoint s1))
- (setq p3 (getpoint p2 "\n剪切方向<退出>: "))
- )
- (progn
- (xyp-copymove s1 p2 (polar p2 (angle p2 p3) 0.1))
- (setq s2 (entlast)
- ptn (xyp-get-Vertexs s2 0)
- s1 (list s1 (vlax-curve-getstartPoint s1))
- )
- (command "trim" s1 "" "f")
- (foreach pt ptn
- (command pt)
- )
- (command "" "")
- (entdel s2)
- )
- )
- (CMDLA1)
- )
|