Trammell Hudson has been working on a laser-cut box generator that produces boxes using an interference fit, as opposed to screws or adhesive. He’s been playing around with different settings, and he’s happy enough with the results to release the code. There are some great examples of the work in his flickr feed.
You can check out the source here. Suggestions for some material-appropriate kerf values are in the code comments.