Box-o-tron 1.0

by zignig, published

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

Featured Thing!


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]

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 )

Recent Comments

view all
Unable to create a config file

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


using box.cfg

no such config , populating default

Traceback (most recent call last):

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

if __name__ == '__main__' : main()

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


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


File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/http://ConfigParser.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.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 boxotron.py -h

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



SyntaxError: invalid syntax"

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


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


-Run the script with command line switches or config file

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

<p>Unable to create a config file</p>

<p>./http://boxotron.py box.cfg</p>


<p>using box.cfg</p>

<p>no such config , populating default</p>

<p>Traceback (most recent call last):</p>

<p> File "./http://boxotron.py&quot;, line 419, in <module></p>

<p> if name == 'main' : main()</p>

<p> File "./http://boxotron.py&quot;, line 405, in main</p>

<p> conffile(option,args[0])</p>

<p> File "./http://boxotron.py&quot;, line 372, in conffile</p>

<p> c.add_section('default')</p>

<p> File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/http://ConfigParser.py&quot;, line 253, in add_section</p>

<p> raise ValueError, 'Invalid section name: %s' % section</p>

<p>ValueError: Invalid section name: default</module></p>

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

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

<p> File "http://boxotron.py&quot;, line 5</p>

<p> $ACADVER</p>

<p> ^</p>

<p>SyntaxError: invalid syntax"</p>

<p>Any ideas? Its seriously *** me off! :(</p>

<p>hey solar-b, </p>

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

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

<p>"Improper color number 0 for Layer on line 90.</p>

<p>Invalid or incomplete DXF import -- drawing discarded."</p>

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

<p>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). </p>

<p>What design software are you using to import you<br>r DXF into that it works?</p>

<p>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.</p>

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

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


<p>&<br>lt; c.add_section('default')</p>

<p>375c374<br>&<br>lt; c.set('default',i,vars(opt)[i])</p>

<p>---<br>&<br>gt; c.set('DEFAULT',i,vars(opt)[i])</p>