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 pmin=(xmin,ymin,zmin) and upper corner pmax=(xmax,ymax,zmax).
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 {{x,y,z}|xmin≤x≤xmax∧ymin≤y≤ymax∧zmin≤z≤zmax}Calling
Cuboid
with no parameters is equivalent toCuboid
(pmin=[0, 0, 0], pmax=[1, 1, 1]).Attributes
a
Distance between xmax−xmin. b
Distance between ymax−ymin. c
Distance between zmax−zmin. center
Alias for centroid
.centroid
Cuboid
centroid, (cx,cy,cz).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
xmax coordinate. xmin
xmin coordinate. ymax
ymax coordinate. ymin
ymin coordinate. zmax
zmax coordinate. zmin
zmin coordinate. Methods
center_centroid
()Center centroid
on origin.contains
(point)Test region membership of point in Cuboid
.rotate
(**kwargs)todict
()Returns a dict
of theCuboid
constructor parameters.translate
(t[, fix_anchor_points])Translate GeometricRegion
points
andvectors
byVector
t.