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

Class RandomSpherePacker

 object --+                        
          |                        
??.instance --+                    
              |                    
         Packer --+                
                  |                
      BoxPackerBase --+            
                      |            
              BoxPacker --+        
                          |        
      RndCubicBoxPackerBase --+    
                              |    
         RandomSpherePackerBase --+
                                  |
                                 RandomSpherePacker

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

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__ = 312
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 sphere into the box.
  • bSphere (BoundingSphere) - Sphere specifying the region into which sub-spheres are packed.
  • tolerance (float) - Generated spheres may overlap by no more than this amount.
  • do2d (bool) - All generated spheres are on the z=0 plane.
Overrides: object.__init__

generate(...)

 

Generates packing of randomly sized spheres.

Overrides: Packer.generate