sknano.core.geometric_regions.Cuboid¶

class sknano.core.geometric_regions.Cuboid(pmin=None, pmax=None, xmin=0, ymin=0, zmin=0, xmax=1, ymax=1, zmax=1)[source][source]

Geometric3DRegion for a cuboid.

New in version 0.3.0.

Represents an axis-aligned cuboid with lower corner $$p_{\mathrm{min}}= (x_{\mathrm{min}},y_{\mathrm{min}},z_{\mathrm{min}})$$ and upper corner $$p_{\mathrm{max}}= (x_{\mathrm{max}},y_{\mathrm{max}},z_{\mathrm{max}})$$.

Parameters: pmin, pmax : array_like, optional The minimum and maximum 3D point coordinates of the axis-aligned cuboid from pmin=[xmin, ymin, zmin] to pmax=[xmax, ymax, zmax]. xmin, ymin, zmin : float, optional The minimum $$(x, y, z)$$ coordinates of the axis-aligned cuboid. xmax, ymax, zmax : float, optional The maximum $$(x, y, z)$$ coordinates of the axis-aligned cuboid.

Notes

Cuboid represents the region $$\left\{\{x, y, z\}| x_{\mathrm{min}}\le x\le x_{\mathrm{max}}\land y_{\mathrm{min}}\le y\le y_{\mathrm{max}}\land z_{\mathrm{min}}\le z\le z_{\mathrm{max}}\right\}$$

Calling Cuboid with no parameters is equivalent to Cuboid(pmin=[0, 0, 0], pmax=[1, 1, 1]).

Attributes

 a Distance between $$x_{\mathrm{max}}-x_{\mathrm{min}}$$. b Distance between $$y_{\mathrm{max}}-y_{\mathrm{min}}$$. c Distance between $$z_{\mathrm{max}}-z_{\mathrm{min}}$$. center Alias for centroid. centroid Cuboid centroid, $$(c_x, c_y, c_z)$$. fmtstr Format string. measure Alias for volume, which is the measure of a 3D geometric region. pmax 3D Point at (xmax, ymax, zmax) pmin 3D Point at (xmin, ymin, zmin) volume Cuboid volume, $$V=abc$$. xmax $$x_{\mathrm{max}}$$ coordinate. xmin $$x_{\mathrm{min}}$$ coordinate. ymax $$y_{\mathrm{max}}$$ coordinate. ymin $$y_{\mathrm{min}}$$ coordinate. zmax $$z_{\mathrm{max}}$$ coordinate. zmin $$z_{\mathrm{min}}$$ coordinate.

Methods

 center_centroid() Center centroid on origin. contains(point) Test region membership of point in Cuboid. rotate(**kwargs) todict() Returns a dict of the Cuboid constructor parameters. translate(t[, fix_anchor_points]) Translate GeometricRegion points and vectors by Vector t.