[Paraview] Error with Structured Grid
fred
fredmfp at gmail.com
Tue Feb 27 20:12:48 EST 2007
Bikash Agarwal a écrit :
> Hi All,
>
Hi,
> I used the datafile copied below to generate a structured grid in
> paraview but with no success. The grid comes up with holes in it(some
> points not being generated). The file below has x=10,y=4,z=4. If I use
> x=y=z then the grid is formed fine but not if they have different
> values. If you save this as a .vtk file and read it in paraview, you
> can see what I mean.
>
> Why do you think some of the points are not being created even though
> they exist in the data file? I have attached the .vtk file with this
> same data and also the C program used to generate it.
>
> for (i=0;i<x;i++)
> {
> for (j=0;j<y;j++)
> {
> for (k=0;k<z;k++)
> {
> fprintf(out,"%f %f %f\n",(float)i, (float)j, (float)k);
> }
> }
> }
>
I guess you should try
for (k=0;k<z;k++)
for (j=0;j<y;j++)
for (i=0;i<x;i++)
instead of
for (i=0;i<x;i++)
for (j=0;j<y;j++)
for (k=0;k<z;k++)
HTH
--
/F
More information about the ParaView
mailing list