363 |
|
if (gp == NULL) /* already initialized? */ |
364 |
|
return; |
365 |
|
/* set grid parameters */ |
366 |
+ |
gp->grid[0] = gp->grid[1] = gp->grid[2] = 0; |
367 |
|
if (sscanf(vval(SECTION), |
368 |
< |
"%lf %lf %lf %lf %lf %lf %lf %lf %lf %lf %lf %lf", |
368 |
> |
"%lf %lf %lf %lf %lf %lf %lf %lf %lf %lf %lf %lf %hd %hd %hd", |
369 |
|
&gp->orig[0], &gp->orig[1], &gp->orig[2], |
370 |
|
&gp->xv[0][0], &gp->xv[0][1], &gp->xv[0][2], |
371 |
|
&gp->xv[1][0], &gp->xv[1][1], &gp->xv[1][2], |
372 |
< |
&gp->xv[2][0], &gp->xv[2][1], &gp->xv[2][2]) != 12) |
372 |
> |
&gp->xv[2][0], &gp->xv[2][1], &gp->xv[2][2], |
373 |
> |
&gp->grid[0], &gp->grid[1], &gp->grid[2]) < 12) |
374 |
|
badvalue(SECTION); |
375 |
|
maxlen = 0.; |
376 |
|
for (i = 0; i < 3; i++) |
384 |
|
if ((d = vflt(GRID)) <= FTINY) |
385 |
|
badvalue(GRID); |
386 |
|
for (i = 0; i < 3; i++) |
387 |
< |
gp->grid[i] = len[i]/d + (1.-FTINY); |
387 |
> |
if (gp->grid[i] <= 0) |
388 |
> |
gp->grid[i] = len[i]/d + (1.-FTINY); |
389 |
|
} |
390 |
|
|
391 |
|
|