[Mike] is a laser cutting newbie and has never had the opportunity to create a file and send it off to a laser for cutting. He knew he didn’t want to squint at a CAD package, nudging lines by tenths of a millimeter, only to screw something up and have to do it all over again. His solution, like so many other automation tasks, was to create a program that would generate a box of any size in .SVG format.
[Mike]’s program runs in C, and only requires a few variables set in the program to create a box of any size. There’s no argc or argv for the program – the one thing that would turn this into a command line utility that simply creates SVG boxes. Perhaps another time.
The rest of [Mike]’s hackerspace, Fab Lab xChc, was impressed the program worked the first time. With this small bit of C code, [Mike] has an easy, simple tool to generate laser cut boxes. The only remotely complicated bit of C this program uses is printf(), so even an Arduino can spit out the SVG for a laser cut box.
Author should slap a proper license on it and throw it up on github. “…you are more than welcome to use this to generate your basic box.” doesn’t count as a proper license, really.
Does every free piece of software really need a license?
I know, what a jerk for releasing free code without a license! Does he know no shame???
Actually, without a license default copyright law applies and in most countries that means you are not allowed to do much with it.
(Yes, it’s annoying, and the people that hammer on stuff like this like crazy open source acolytes are annoying. But there is a bases for why they do it)
Unless the author sues you for copyright infringement, nothing will happen when you make a copy. Copyright law is typically a civil law, not a criminal law. And the statement “you are more than welcome to use this” will be interpreted by the court as if the work has been put in public domain, so you have nothing to worry about.
Indeed, copyright infringement should be a civil law matter, but orgs like RIAA and MPAA have managed to make it criminal.
“means you are not allowed to do much with it”
I guess that means you can’t do much with Shakespeare since its authors have failed to maintain the copyright.
Nope. Nor does every piece of code have to be commented or neatly written, but it’s a good habit to get into. A license is pretty much a couple of clicks if you’re putting stuff on GitHub.
I do particularly recommend sticking it on GitHub, though, since it’s awesome for collaboration.
I hate to be that guy, but http://www.makercase.com works for me.
Yeah, but the bit I left out was precision drilling/cutting of the 56 x 3mm and 114 x 2mm holes needed for mounting the display segments… that was all done in code too.
There’s also https://github.com/mattvenn/cad/tree/master/tools/boxotron and other versions out there too.
Originally from: http://www.thingiverse.com/thing:404
It’s written in Python and has more features than makercase does. Plus you have the source and it’s scriptable rather than HTML based.
Or this one from Florian Festi. He covers all sorts of joints.
https://github.com/florianfesti/boxes
I hate to be that guy, but….
Are there any box gens out there that output a 3D model in DXF, IGES, STEP, etc that are CAD import friendly?
THAT would be useful.
Man, tough crowd
or this inkscape plugin which also takes into account the laser (or cutter) kerf…
https://github.com/Neon22/inkscape-LasercutBox
Programmatically generating physical objects is the only way to fly!
I used a similar technique for my big LED matrix project:
http://martin.atkins.me.uk/radiant-mural/
I made a really simple Python library for “turtle-graphics-style” drawing in the process:
https://github.com/apparentlymart/cadoodle/blob/master/cadoodle/__init__.py
Nice idea, cool output.
Dat code though…
:-) This is ‘HACK’aday after all.
There is a couple of non-obvious features that make it uglier than it should be. For example, the panels are perfectly symmetrical as everything uses integer math and any leftovers are placed in the center finger. if I used floats and rounded or used integer i*n/m to locate the panels could be off by 0.2mm depending on the parameters used.
Unlike any others i have seen (although i haven’t looked either) it has an allowance for the cut width, giving the fingers a really snug fit. The cut is about 0.16 mom wide, and so the fingers end up being 0.04mm wider than the gaps they go into.
When you include these, there isn’t really thay many sins in there for an hour while half watching TV. Sure I could pull out some repeating code into a function, but it would actually make it more complex. But if you want to show me how to do it properly then send me and email – I am actually keen to do it better!
I have started working on it in between a few other bits, it is a bit of a struggle with trying to work out what to do.
Also, yes, i understand what it is and love the “i wanted to solve a problem so I whacked this together” attitude :D
0.16mm wide? That is a very good laser you are using. Most machines I have come across have a kerf width of 0.3 (laserpro spririt GX/GXL, to 0.4 (epilog mini35). Glass tube lasers might even have a wider kerf.
0.16mm sounds about right, even the cheap 40W lasers with glass tubes do that.
I’ve got three (hey, you need a couple of spares) and I usually allow for 0.2mm kerf. Bigger or smaller depending on how tight I want the fit. Kerf depends on material and focal length as well.
Allowing for the laser kerf and making the fingers slightly tapered makes it quite nifty and ensures a good fit. Tip of the hat for that!
What I usually see (I work in a fablab) is no allowance for the laser process at all, which leads to boxes that need glue or fasteners to stay together. And non-fitting parts because of errors, as designing in 2D makes that easy.
Seems like the long way round when OpenSCAD will do the same but also with the ability to generate 3D assemblies: http://engineer.john-whittington.co.uk/2014/12/laser-cut-adaptable-wire-dispenser-openscad/
Hurrah it will run on an arduino!
Arduino can run SQL databases, solve calculus equations and perform machine vision, moving a saw blade is not a big accomplishment.
I create my laser cuts with OpenSCAD (really a form of C), and then use the projection() function to output a .dxf file.
postscript is (not so surprisingly!) well equipped for the task of describing the motion of a stylus across a planar surface.
Now you just need to automate cutting of your own 7-segment LED modules!
Also check out this free ruby library: https://github.com/kigster/laser-cutter and the companion website: http://makeabox.io I am able to generate all of my boxes using this tool, and they look fantastic. I documented this on my blog kiguino.github.io/2014/11/21/announcing-laser-cutter-makeabox-dot-io.html?ref=hackaday
Doesn’t optimise the cuts.
What does that mean?