NullShape¶
-
class
sisl.shape.
NullShape
(*args, **kwargs)[source]¶ A unique shape which has no well-defined spatial extend, volume or center
This special shape is used when composite shapes turns out to have a null space.
The center will be equivalent to the maximum floating point value divided by 100.
Initialization of the NullShape takes no (or any) arguments. Since it has no volume of point in space, none of the arguments has any meaning.
Attributes
The geometric center of the shape
Methods
__init__
(self, \*args, \*\*kwargs)Initialize a null-shape
expand
(self, c)Expand the shape by a constant value
scale
(self, scale)Return a new Shape with a scaled size
toCuboid
(self)Return a cuboid with side-lengths 1e-64
toEllipsoid
(self)Return an ellipsoid with radius of size 1e-64
toSphere
(self)Return a sphere with radius of size 1e-64
volume
(self, \*args, \*\*kwargs)The volume of a null shape is exactly 0.
within
(self, other)Return
True
if other is fully within selfwithin_index
(self, other)Always returns a zero length array
-
property
center
¶ The geometric center of the shape
-
expand
(self, c)¶ Expand the shape by a constant value
-
scale
(self, scale)¶ Return a new Shape with a scaled size
-
within
(self, other)¶ Return
True
if other is fully within selfIf other is an array, an array will be returned for each of these.
- Parameters
- otherarray_like
the array/object that is checked for containment
-
property