Number of points cannot be 1 for points generated from line, plane, and box
In FieldConvert modules interppoints and interpptstopts, and in the HistoryPoints filter, the points can be generated using line, plane or box, such as plane=npts1,npts2,x0,y0,z0,x1,y1,z1,x2,y2,z2,x3,y3,z3
and box=npts1,npts2,npts3,xmin,xmax,ymin,ymax,zmin,zmax
.
However, the number of points npts2/3
must be greater than 1 because the grid size is computed using delta = (zmax - zmin) / (npts3 - 1)
in the code. As a result, the box cannot reduced to a plane or a line automatically by setting 'npts1/2' as 1. This causes inconvenience since defining a box is apparently easier than defining a plane.
This problem can be fixed by changing the way of computing the grid size. One feasible solution is if npts3
equals 1, then set delta = 0
; else set delta = (zmax - zmin) / (npts3 - 1)
.