一个用短直线画圆的问题
(defun c:qqq()(setq r 50 pt '(0 0))
(command "layer" "m" "ArtLine" "C" 1 "" "")
(command "color" "bylayer")
(command "LINE" )
(setq n 1)
(repeat 360
(setq ang (/ (* 2 n pi ) 360))
(setq pp (polar pt ang r))
(command pp)
(setq n(1+ n))
)
(command "")
)
file:///C:\Documents and Settings\Administrator\Application Data\Tencent\Users\294406496\QQ\WinTemp\RichOle\~6ERAXR{{7K0}_BPUK$HO
我想利用短直线近似画一个圆。我将圆分成了360段,border=0那么每一段的偏转角为1°,但是我画出来的图形怎么偏转角不是1°,谁能告诉我怎么回事
(defun c:qqq()
(setq r 50 pt '(0 0))
(command "layer" "m" "ArtLine" "C" 1 "" "")
(command "color" "bylayer")
(setq aa (/ Pi 180)
n 1
)
(command "LINE" )
(repeat 360
(setq pp (polar pt (* aa n) r))
(command pp)
(setq n (1+ n))
)
(command "C")
)
建议考虑捕捉
明白了,谢谢了,需要添加一句(setvar "osmode" 0) 学习了,还能这样用语句
页:
[1]