Package esys :: Package lsm :: Package geometry :: Module GeometryPy :: Class CubicBoxPacker
[hide private]
[frames] | no frames]

Class CubicBoxPacker

 object --+                    
          |                    
??.instance --+                
              |                
         Packer --+            
                  |            
      BoxPackerBase --+        
                      |        
              BoxPacker --+    
                          |    
         CubicBoxPackerBase --+
                              |
                             CubicBoxPacker

Instances generate a regular cubic close packing of identically sized spheres within the confines of a specified box.

Instance Methods [hide private]
 
__init__(...)
Constructor.
 
generate(...)
Generates cubic packing of spheres.

Inherited from Packer: __reduce__, getNumSpheres, getSimpleSphereCollection, getSimpleSphereIterator

Inherited from unreachable.instance: __new__

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  __instance_size__ = 264
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(...)
(Constructor)

 

Constructor.

Parameters:
  • radius (float) - Radius of generated spheres.
  • bBox (BoundingBox) - box specifying the region into which spheres are packed. A 2D packing can be generated by specifying a zero sized z dimension, eg bBox=BoundingBox(Vec3(1,1,0),Vec3(21,21,0)) will generate a 2D packing in the x-y plane.
  • circDimList (list of 3 bool elements) - list indication which (if any) of the box dimensions is circular (note, only a single dimension may be circular).
  • tolerance (float) - Generated spheres may overlap by no more than this amount.
Overrides: object.__init__

generate(...)

 

Generates cubic packing of spheres.

Overrides: Packer.generate