 - ;; 需要e派工具箱(XCAD)的支持:[url=http://xyp1964.ys168.com]http://xyp1964.ys168.com[/url]
- (defun c:tt ()
- (CMDLA0)
- (if (setq p1 (getpoint "\n基点<退出>: "))
- (progn
- (command "pline" p1)
- (while (setq p2 (getpoint p1 "\n基点<退出>: "))
- (command p2)
- (setq p1 p2
- )
- )
- (command "c")
- (setq s1 (entlast)
- ptn (xyp-get-Vertexs s1 0)
- )
- (xyp-erase s1)
- )
- )
- (if (setq ss (ssget "WP" ptn '((0 . "TEXT") (1 . "~*[~`--9]*"))))
- (progn
- (setq lst (xyp-Sort ss 1 "none")
- s1 (cdar lst)
- s2 (cdr (last lst))
- )
- (xyp-circle
- (xyp-get-MinMaxPoint s1 5)
- (xyp-get-dxf 40 s1)
- )
- (xyp-circle
- (xyp-get-MinMaxPoint s2 5)
- (xyp-get-dxf 40 s2)
- )
- )
- )
- (CMDLA1)
- )
|