Python script for generating OpenSCAD boxes
by jbernardis, published
To this end, I developed a python/tkinter script that allows you to specify box parameters and it generates clean OpenSCAD source code. Cut and paste the code right into OpenSCAD, hit F5, and you're just about ready to print.
Each face of the box is rendered with a separate module so that they can be printed one at a time allowing you to make further modifications, such as openings or mounting brackets.
Recent Commentsview all
I'm not sure why it works this way in Linux, but I changed the code so that the text box containing the SCAD code is not disabled. You can now copy it (desired behavior), but you can also change it (undesired behavior). Of course your changes are lost the next time the window is refreshed.
Liked Byview all
Give a Shout Out
The generated OpenSCAD program lays the faces out so that they do not overlap, but it makes no attempt to fit them onto your printer bed. That is left to you. Some people prefer plating everything at once; some people, myself included, prefer printing things one at a time.
The paramters you can provide to the program are: 1) internal dimensions - width, height, and depth. 2) how long and wide the tabs are, and how much space there can be between them (the span). You can also specify a "slop" paremeter which is used to make the slots slightly larger so that fit is not an issue. 3) You can specify the height and width of feet that are at the base of the front and rear faces. If either of these parameters is 0, no feet will be generated. 4) You can specify how many latch points are generated. The latch points are where M3 bolts can be inserted into the front and rear faces to hold the box together. You specify the number and whether the are along the top, bottom, or both. By default, these latch points are spaces equally across the width. Alternatively you can manually specify where the latch points should be.
Finally, once you have the parameters set the way you want, you can save that configuration, and then recall it later if you need to make modifications.
You must be logged in to post a comment.