[ARX]高手指点!
程序调试通过,可是却无法执行,请高手帮忙查错,谢谢先!:)目的是想通过四个点求其他点的坐标,保存成数组,再赋给点,用CAD命令连接。<BR> double cord;<BR> ads_point pt;
x1=pt1,y1=pt1,z1=0.0,<BR> x2=pt2,y2=pt2,z2=0.0,<BR> x3=pt3,y3=pt3,z3=0.0,<BR> x4=pt4,y4=pt4,z4=0.0;<BR>
<BR> <BR> <BR> a1=x2-x1; b1=y2-y1; deltx1=a1/n; delty1=b1/m;<BR> a2=x3-x4; b2=y3-y4; deltx2=a2/n; delty2=b2/m;
<BR> for(i=0;i<(m+1)*(n+1);i++)<BR> {cord=0.0;} //初始化z坐标
for(i=0;i<=n;i++) //i为列循环<BR> { <BR> xx1=x1+i*deltx1; yy1=y1+i*delty1;<BR> xx2=x4+i*deltx2; yy2=y4+i*delty2;
deltx3=(xx2-xx1)/m; delty3=(yy2-yy1)/m;<BR> <BR> cord=xx1; cord=yy1;<BR> cord[(m+1)*(i+1)]=xx2;cord[(m+1)*(i+1)]=yy2;<BR> <BR> <BR> <BR> for(j=1;j<=m-1;j++) //j为行循环<BR> {xx3=xx1+j*deltx3; yy3=yy1+j*delty3;<BR> k++;<BR> cord=xx3; cord=yy3;<BR> <BR> k=k+2;}
<BR> }<BR> <BR> for(i=1;i<=1000;i++)<BR> {pt=cord; pt=cord;<BR> }<BR> <BR>
<BR> acedCommand(RTSTR,"3dface",<BR> RTPOINT,pt,//Firsr point<BR> RTPOINT,pt,//Second point<BR> RTPOINT,pt,//Third point<BR> RTPOINT,pt,//Forth point<BR> RTSTR,"",<BR> RTNONE);
页:
[1]