This OpenScad module allows you to generate models for arbitrary Burr puzzle pieces.
The bit pattern used for configuration is identical with the one on the following site: http://www.research.ibm.com/BurrPuzzles/index.html
You can use the Burr calculator on this site to calculate and print your own puzzles.
Additionally, the file contains the burrx() module which allows the corner blocks on the lower level to be set. It basically extends the pattern to 4*L bits.
burr (size, length, pattern, tolerance);
o size: The size of a single cube.
The tile will be (length + 2) * size units wide
o length: The length of the pattern.
One cube will be added to each side on the top half,
two on the bottom half to constitute a block.
o pattern: A vector of ones and zeroes that determine whether
an individual block is existing or not.
o tolerance: Each face of the block will be intruded by the
tolerance value in all dimensions.
A block of size L will require 2 * L + 2 * (L-2) bits.
The first bit is on the upper layer, towards the origin.
The first L bits are the lower row on the upper layer.
The second L bits are the upper row on the upper layer.
The third L-2 bits are the lower row on the lower layer.
The final L-2 bits are the upper row on the lower layer.
Or just play with the bits to get a feeling.
The STL file is an example level 6 burr puzzle, which you can also find at http://www.thingiverse.com/thing:7446