- ;; 云共享 [url]http://yunpan.cn/QXQKsW9gAPmpF[/url]
- (defun c:tt ()
- (xyp-CMDLA0)
- (setq dist (Udist 7 "" "距离<输入或鼠标直接量取>" dist nil))
- (setq i -1)
- (princ "\n选择曲线: ")
- (if (setq ss (ssget '((0 . "*LINE,ARC,CIRCLE,ELLIPSE"))))
- (while (setq s1 (ssname ss (setq i (1+ i))))
- (setq ptn (xyp-Get-CurveIntersLeng s1 3)
- p1 (vlax-curve-getStartPoint s1)
- p2 (vlax-curve-getEndPoint s1)
- p3 (last ptn)
- p4 (car ptn)
- )
- (if (< (- (xyp-Get-LengthAtPoint s1 p2)(xyp-Get-LengthAtPoint s1 p3)) dist)
- (xyp-breakE s1 p2 p3)
- )
- (if (< (- (xyp-Get-LengthAtPoint s1 p4) (xyp-Get-LengthAtPoint s1 p1) ) dist)
- (xyp-breakE s1 p1 p4)
- )
- )
- )
- (xyp-CMDLA1)
- )
|