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

Class RandomBoxPacker

 object --+                    
          |                    
??.instance --+                
              |                
         Packer --+            
                  |            
      BoxPackerBase --+        
                      |        
              BoxPacker --+    
                          |    
        RandomBoxPackerBase --+
                              |
                             RandomBoxPacker

Instances generate a packing of randomly sized spheres within the confines of a specified box.

Instance Methods [hide private]
 
__init__(...)
Constructor.
 
generate(...)
Generates packing of randomly sized 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__ = 296
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(...)
(Constructor)

 

Constructor.

Parameters:
  • minRadius (float) - Minimum radius of generated spheres.
  • maxRadius (float) - Maximum radius of generated spheres.
  • cubicPackRadius (float) - Initial randomly sized seed spheres are generated at positions corresponding to a regular cubic-packed grid of spheres with radius cubicPackRadius.
  • maxInsertFails (int) - Stopping criterion for terminating the random. insertion algorithm. Algorithm terminates after maxInsertFails number of attempts at fitting a randomly generated spheres into the box.
  • bBox (esys.lsm.util.FoundationPy.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 packing of randomly sized spheres.

Overrides: Packer.generate