- ;; 自定义函数下载: [url=http://bbs.mjtd.com/thread-95673-1-1.html]http://bbs.mjtd.com/thread-95673-1-1.html[/url]
- ;; 洞口线
- ;; 伪源码需要e派工具箱(XCAD)的支持
- (defun c:tt ()
- (CMDLA0)
- (xyp-MkLaCo "洞口线" 1)
- (setq int (Uint 1 "" "洞口线离左上角点的比例" int)) ;10
- (setq i -1)
- (if (setq ss (ssget '((0 . "*polyLINE"))))
- (while (setq s1 (ssname ss (setq i (1+ i))))
- (setq p1 (xyp-9pt s1 1)
- p7 (xyp-9pt s1 7)
- p9 (xyp-9pt s1 9)
- p3 (xyp-9pt s1 3)
- dl (/ (distance p1 p9) int 1.)
- p7a (polar p7 (angle p7 p3) dl)
- s2 (xyp-Entmake-lwPolyline (list p1 p7a p9) nil)
- )
- )
- )
- (CMDLA1)
- )
|