请达人门进来帮忙看一下是什么问题!
为什么我这个程序画不了这样的图不知道程序错在什么地方 请大虾们指点一下 感激不尽
(defun C:ring();<BR> (setq pt (getpoint"输入圆心坐标:"));<BR> (setq r1 (getreal"输入内圆半径:"));<BR> (setq r2 (getreal"输入小圆半径:"));<BR> (setq r3 (getreal"输入外圆半径:"));<BR> (setq n (getint"输入小圆个数:"));<BR> (setq pai 6.28318);<BR> (command "circle" pt r1);<BR> (command "circle" pt r3);<BR> (setq r (/ (+ r1 r3) 2));<BR> (command "layer" "M" "1" "C" "BLUE" "1" "L" "CENTER" "1" "S" "1");<BR> (command);<BR> (command "circle" pt r);<BR> (command "layer" "M" "2" "C" "RED" "2" "S" "2");<BR> (command);<BR> (setq ang 0);<BR> (setq k 1);<BR> (while (<= k n);<BR> (setq ang (+ ang (/ pai n)));<BR> (setq ptn (polar pt ang r));<BR> (command "circle" ptn r2);<BR> (setq k (+ 1 k));<BR>);<BR>);
<BR>
有知道问题的人指点一下
谢谢了
回复
(defun C:ring()<BR> (setvar "osmode" 0) ;***(注意关闭捕捉)<BR> (setq pt (getpoint"输入圆心坐标:"))<BR> (setq r1 (getreal"输入内圆半径:"))<BR> (setq r2 (getreal"输入小圆半径:"))<BR> (setq r3 (getreal"输入外圆半径:"))<BR> (setq n (getint"输入小圆个数:"))<BR> (setq pai 6.28318);<BR> (command "circle" pt r1)<BR> (command "circle" pt r3)<BR> (setq r (/ (+ r1 r3) 2))<BR> (command "layer" "M" "1" "C" "BLUE" "1" "L" "CENTER" "1" "S" "1" "")<BR> (command "circle" pt r2)<BR> (command "layer" "M" "2" "C" "RED" "2" "S" "2" "")<BR> <BR> (setq ang 0)<BR> (while (<= ang pai)<BR> <BR> (setq ptn (polar pt ang r))<BR> (command "circle" ptn r)<BR> (setq ang (+ ang (/ pai n)))<BR> )<BR>) 谢谢 我把 对象捕捉关闭了就可以了 谢谢 题外话,怎么有人抢注了偶的名号,:) 没有想到 还有这个名号 我一直都在用这个看来我们还是挺有缘的:)
以后 罩着小弟啊 !!
页:
[1]