- (defun c:tt ()
- (setvar "cmdecho" 0)
- (setq os (getvar "osmode"))
- (setvar "osmode" 0)
- (setq dd (getdist "\n圆半径<10>: "))
- (if (null dd)
- (setq dd 10)
- )
- (setq num (getint "\n起始编号<1>: "))
- (if (null num)
- (setq num 1)
- )
- (setq dd2 (/ dd 5.))
- (while (setq pt1 (getpoint "\n第一点<退出>: "))
- (command "donut" 0 dd2 pt1 "")
- (setq pt2 (getpoint pt1 "\n第二点<退出>: ")
- pt2a (polar pt2 (angle pt2 pt1) dd)
- )
- (command "line" pt1 pt2a "")
- (command "circle" pt2 dd)
- (command "text" "m" pt2 (/ dd 2) 0 (itoa num))
- (setq num (1+ num))
- )
- (princ)
- )
|