Shapes (sisl.shape)ΒΆ

A variety of default shapes.

All shapes inherit the Shape class.

All shapes in sisl allows one to perform arithmetic on them. I.e. one may add two shapes to accomblish what would be equivalent to an & operation. The resulting shape will be a CompositeShape which implements the necessary routines to ensure correct operation.

Currently these mathematical/boolean operators are implemented:

A & B
intersection of shapes
A | B or A + B
union of shapes
A ^ B
the disjunction union
A - B
complementary shape
Shape(center) Baseclass for all shapes.
Cuboid(v[, center]) A cuboid/rectangular prism (P4)
Cube(side[, center]) 3D Cube with equal sides
Ellipsoid(v[, center]) 3D Ellipsoid shape
Sphere(radius[, center]) 3D Sphere
NullShape(*args, **kwargs) A unique shape which has no well-defined spatial extend, volume or center