3.14 box3d – Bounding box computation for point sets

The box3d routine computes the bounding box of a given set of points, defined as the smallest axis-aligned rectangular parallelepiped containing all points. It returns the minimum and maximum coordinates along each axis (\(x, y, z\)).

Fortran:

call box3d(box,ntp,vertp)

C:

box3d(box,&ntp,vertp);

Python:

box = voft.box3d(ntp,vertp)

Arguments:

box

OUT

W_P

array of length \((6)\) storing the bounding box coordinates. Indices are mapped as follows: \([x_\mathrm{min}, x_\mathrm{max}, y_\mathrm{min}, y_\mathrm{max}, z_\mathrm{min}, z_\mathrm{max}]\)

ntp

IN

I_P

total number of points in the set

vertp

IN

W_P

array of dimensions \(({nv},3)\) storing the \(x,y,z\)-coordinates of each point

Note: The routine processes the first ntp rows of vertp, with \(1\leq \texttt{ntp}\leq \texttt{nv}\). It does not use connectivity information to identify active vertices. Consequently, unused vertices within this range are also included in the bounding-box calculation.