|
发表于 2004-1-30 11:26:00
|
显示全部楼层
先謝Lockmyeye,你上面程序我在autocad2002中運行通過,但顯示出來是等直徑圓在x,Y軸上已給定間距排列!可能是我沒說清楚!我所需的是實體圓在x,y軸上不但可以不同間距RUN,而且其直徑也會跟我給定增量或減量變化!下面是這樣一個程序及運行結果,但我又想到一個問題,如果我不滿意某一區域點排列(如圖畫圓圈處),怎麼在程序上改一些基本參數就可重新lay我指定區域的點?請幫忙探討與回覆,TKS!
(setq Ycolum(getint"\n pls input the dot's Q'ty you wanted desgin in Y axis: ")) ;;y軸方向點數
(setq Yleth(getreal"\n pls input the Y axis startpoint coordinate: ")) ;;y軸起始座標
(setq Xcolum1(getint"\n pls input the dot's Q'ty you wanted desgin in x axis: "))
(setq X_Cood1(getreal"\n pls input the X axis startpoint coordinate: "))
(setq ridus1(getreal"\n pls input the Diameter of startpoint you wanted desgin in mm: "))
(setq pitch_x(getreal"\n pls input the pitch between X axis dots you wanted desgin: "))
(setq pitch_y(getreal"\n pls input the pitch between Y axis dots you wanted desgin: "))
(setq reduce1(getreal"\n pls input reduce the dot you wanted desgin : "))
(setq Xchange1 1)
(setq Ychange 1)
(setq CP '(0 0 0))
(while (<= Ychange Ycolum)
(setq ridus (+ ridus1 reduce1)
pitch_a pitch_x
Xcolum Xcolum1
reduce reduce1
X_Cood X_Cood1
Xchange Xchange1
pitch_b pitch_y
)
(setq Yleth (+ Yleth pitch_b))
( while (<= Xchange Xcolum)
(setq X_Cood (+ X_Cood pitch_a))
(setq CP (list X_Cood Yleth 0))
(setq ridus (- ridus reduce))
(command "donut" (- ridus ridus) ridus CP "")
(setq Xchange (+ Xchange 1))
)
(setq Ychange (+ Ychange 1))
)
) |
|