- (defun c:tt () ; tt(实体开槽)
- (xyp-Start)
- (defun abc (ptn / p1 p2)
- (while (and (setq p1 (car ptn)) (setq p2 (cadr ptn)))
- (xyp-line p1 p2)
- (setq ptn (cddr ptn))
- )
- )
- (or dd (setq dd 100.))
- (setq dd (Udist 7 "" "槽宽<输入或鼠标直接量取>" dd nil))
- (while (and (setq p0 (getpoint "\n基点<退出>: "))
- (setq p1 (getpoint p0 "\n基点<退出>: "))
- )
- (setvar "osmode" 0)
- (setq s1 (xyp-Line p0 p1))
- (xyp-Offset s1 (* dd 0.5) t nil nil)
- (setq s2 (entlast))
- (xyp-Offset s1 (* dd 0.5) nil t nil)
- (setq s3 (entlast))
- (setq ptn2 (xyp-Get-CurveIntersLeng s2 4))
- (setq ptn3 (xyp-Get-CurveIntersLeng s3 4))
- (entdel s1)
- (command "trim" s2 s3 "" "f")
- (foreach pt (list p0 p1) (command pt))
- (command "" "")
- (abc ptn2)
- (abc ptn3)
- (entdel s2)
- (entdel s3)
- )
- (xyp-End)
- )
|