 - (defun c:cc ()
- (setq leng (getint "请输入圆的周长mm: "))
- (if (= (rem leng 100) 0)
- (while (setq p0 (getpoint "\n指定圆心位置: "))
- (c1)
- )
- )
- (princ)
- )
- (defun c1 (/ bb ang)
- (command "layer" "m" "立管" "c" 5 "" "")
- (setq bb (rem leng 500.)
- ang (cond ((= bb 400) (* 360 (/ 400.0 500)))
- ((= bb 300) (* 360 (/ 300.0 500)))
- ((= bb 200) (* 360 (/ 200.0 500)))
- ((= bb 100) (* 360 (/ 100.0 500)))
- (t 0)
- )
- p1 (polar p0 0 79.58)
- )
- (command "text" "j" "m" p0 30 0 (rtos (/ leng 1000.) 2 2))
- (repeat (/ leng 500)
- (command "circle" p0 79.58)
- )
- (if (/= ang 0)
- (command "arc" "c" p0 p1 "a" ang)
- )
- )
|