```#box_geometry.txt:
#================
#
#An example GenGeo Python script to construct a box of spherical particles
#
#D. Weatherley, UQ, 2018.
#
#import the GenGeo module:
from gengeo import *

#Specify the min/max points of the spatial domain:
minPoint = Vector3 (-5,-5,-5)
maxPoint = Vector3 (10,10,10)

#Specify the range of particle radii:
Rmax = 0.5
Rmin = 0.2

#define a cube of side length, s=5 with one corner at the origin:
box = BoxWithPlanes3D (
minPoint = Vector3 (0,0,0),
maxPoint = Vector3 (5,5,5)
)

#add planar walls to each side of the cube:
#left side wall:
Plane (Vector3(0,0,0), Vector3(1,0,0))
)
#bottom wall:
#front wall:
#right wall:
#top wall:
#back wall:

#Construct a neighbour table to store particles inserted within the cube:
ntable = MNTable3D (
minPoint = minPoint,
maxPoint = maxPoint,
gridSize = 2.5 * Rmax,
numGroups = 1
)

#Construct a "packer" to insert particles into the cube:
packer = InsertGenerator3D (
insertFails = 10000,   # a good default value is 10000
maxIterations = 100,	  # a good default value is 100
tolerance = 1.0e-6,	  # a small number, typically 1.0e-6
seed = True		  # generates random packings if seed=True
)

#Instruct the packer to fill the cube with particles:
packer.generatePacking (
volume = box,
ntable = ntable,
groupID = 0,
tag = 1
)

#Set tag=2 for all particles within a distance d=0.5
# of the bottom side of the cube:

ntable.tagParticlesAlongPlane (
plane = Plane(Vector3(0,0,0),Vector3(0,1,0)),
distance = 0.5,
tag = 2,
groupID = 0
)

#write the particle geometry to a GenGeo geometry file:
ntable.write(fileName = "mybox.geo", outputStyle = 1)

#write the particle geometry to a VTK file for visualisation:
ntable.write(fileName = "mybox.vtu", outputStyle = 2)
```
GlossyBlue theme adapted by David Gilbert 