雪山飞狐 发表于 2004-9-26 01:28:00

请达人门进来帮忙看一下是什么问题!

为什么我这个程序画不了这样的图



不知道程序错在什么地方 请大虾们指点一下       感激不尽


(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 (&lt;= 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>       




雪山飞狐 发表于 2004-9-26 02:14:00

有知道问题的人指点一下


谢谢了

王咣生 发表于 2004-9-26 07:48:00

回复

(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 (&lt;= ang pai)<BR>                       <BR>                       (setq ptn (polar pt ang r))<BR>                       (command "circle" ptn r)<BR>                       (setq ang (+ ang (/ pai n)))<BR>       )<BR>)

雪山飞狐 发表于 2004-9-26 10:27:00

谢谢       我把 对象捕捉关闭了就可以了       谢谢

雪山飞狐_lzh 发表于 2004-9-26 21:02:00

题外话,怎么有人抢注了偶的名号,:)

雪山飞狐 发表于 2004-9-26 22:06:00

没有想到 还有这个名号       我一直都在用这个


看来我们还是挺有缘的:)


以后 罩着小弟啊 !!
页: [1]
查看完整版本: 请达人门进来帮忙看一下是什么问题!