Box-o-tron 1.0

by zignig, published

Box-o-tron 1.0 by zignig Mar 29, 2009

Featured Thing!

Tip Designer Report Thing

Thing Info

17030Views 2793Downloads


Box-o-tron 1.0

Python box creator

Now with extra Awesome. boxotron now includes, command line interface and stored config files.

Does tab and slot and "Cupcake" style T joins
Usage: boxotron.py [options]

-h, --help show this help message and exit
-l LENGTH, --length=LENGTH
Length of box in mm
-w WIDTH, --width=WIDTH
width of box in mm
-d DEPTH, --depth=DEPTH
depth of box in mm
thickness of material in mm
clearance between panels of material in mm
-i INSET, --inset=INSET
inset to middle of slot material in mm
-s SLOT_LENGTH, --slot_length=SLOT_LENGTH
length of slot in mm
-f FILENAME, --file_name=FILENAME
-j JOIN_EVERY, --join_every=JOIN_EVERY
join every x in mm
--type=TYPE box type = slot , bolt
-b BOLT, --bolt_size=BOLT
bolt size in mm
bolt length in mm
clearance between bolt and tab , multiple of bolt size
nut size - multiple of bolt size
nut depth - multiple of bolt size

(hint , specify a non-existent file name and it will make a default one of that name )


-Run the script with command line switches or config file

  • Check and Edit the DXF file
  • Laser Cut
  • Make ( bolt or slot )
  • BOX !!
Tip Designer Report Thing

Thing Info

17030Views 2793Downloads


Liked By

View All


Box-o-tron 1.0 by zignig is licensed under the GNU - GPL license.

Give a Shout Out

If you print this Thing and display it in public proudly give attribution by printing and displaying this tag. Print Thing Tag

All Apps

No results.


does any one have a config file they could give me a copy of . I cant seem to generate one

Unable to create a config file

./http://boxotron.pyboxotron.py box.cfg


using box.cfg

no such config , populating default

Traceback (most recent call last):

File "./http://boxotron.pyboxotron.py", line 419, in <module>

if __name__ == '__main__' : main()

File "./http://boxotron.pyboxotron.py", line 405, in main


File "./http://boxotron.pyboxotron.py", line 372, in conffile


File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/http://ConfigParser.pyConfigParser.py", line 253, in add_section

raise ValueError, 'Invalid section name: %s' % section

ValueError: Invalid section name: default</module>

This creates a a left and right box where the side lines are drawn the wrong direction ./http://boxotron.pyboxotron.py -l 280 -w 230 -d 46 -t 3 --type=bolt -j 80 -s 30 --bolt_length=10 --nut_multiplier=2.5

It doesn't work for me . . . . Installed Python 2.6, 2.7 and 3.2, just comes up "C:\Box-O-Tron
gt;python http://boxotron.pyboxotron.py -h

File "http://boxotron.pyboxotron.py", line 5



SyntaxError: invalid syntax"

Any ideas? Its seriously *** me off! :(

hey solar-b,

I didn't have any trouble importing into Corel X4 , so I'm not sure what's going on there.
Try importing into QCAD and then exporting again.

Had some problems importing a generated box into CorelDraw X4, so I thought I'd pop it into AutoCAD 2008. DXFimport complained about:

"Improper color number 0 for Layer on line 90.

Invalid or incomplete DXF import -- drawing discarded."

Grrr. I hate software that throws up its arms rather than try skipping the error.

I tweaked your Python script on line 412 to make the color 3, and at least ACAD is happier, but still not import into CorelDraw (no biggie, I can re-dump the ACAD).

What design software are you using to import you
r DXF into that it works?

What I did was just change the script to use a [box] stanza instead of [default] which seems to have some magical properties not relevant to just defining a box.

Er... ok, that's only the first step, it seems like ConfigParser has changed the way it handles DEFAULT. Or something.

I get an error on Ubuntu Maverick and Python 2.6. Here's the diff to fix it:


lt; c.add_section('default')

lt; c.set('default',i,vars(opt)[i])

gt; c.set('DEFAULT',i,vars(opt)[i])