Loading

A-Mazing Box

by wizard23, published

A-Mazing Box by wizard23 Dec 23, 2009

Featured Thing!

Description

A python script to generate OpenSCAD models to generate two parts of a box that screw together and snap fit if you find your way through the maze :)

UPDATE: because I got so many requests from people I now offer printed versions for sale at: hackerspaceshop.com/3dprinting/a-mazing-box.html
contact me for custom mazes :)

Recent Comments

view all

what program did u use to make it

The source is really really broken in all the current tools.

If you can make a PNG that the python tools are happy with (the original got converted to a jpg by thingiverse BTW), it compiles with the maze too low on the model and renders to a thin flat disc.

One I hacked to have the maze in the right place on the compile renders better, but is clipped at about 15mm on the render.

:-( Any clues?

this is exactly what i was going to print these for :D more specifically this one http://www.thingiverse.com/thi... :)

More from Interactive Art

view more

Liked By

view all

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

Instructions

Actually the maze pattern comes from the attached greyscale png :)

To regenerate the model adapt the png filename and the variable "part" in mazebox_clean2_stable.py (1 == bottom part, 2 == top part)

The png must be grayscale without an alpha channel.

The python script is a mess but I needed to get this done before xmas... Also sorry for the weird filenames, but thingiverse does not let me rename files...

The model was intended to have exact 1.5mm wall thickness when intersected with a plane parallel to the XY-plane (to get skeinforged into 2 layers) but the 3D inset operation is tricky so it sometimes is a little less but the repraped parts are still very stable after my makerbot printed for two hours :)

Comments

You must be logged in to post a comment.

mjoslin27 on Feb 21, 2014 said:

what program did u use to make it

Bracken on Feb 13, 2014 said:

The source is really really broken in all the current tools.

If you can make a PNG that the python tools are happy with (the original got converted to a jpg by thingiverse BTW), it compiles with the maze too low on the model and renders to a thin flat disc.

One I hacked to have the maze in the right place on the compile renders better, but is clipped at about 15mm on the render.

:-( Any clues?

LowIQGenius on Mar 27, 2013 said:

These look like they would make great geocache containers :)

warweed on Apr 16, 2013 said:

this is exactly what i was going to print these for :D more specifically this one http://www.thingiverse.com/thi... :)

richgain on Dec 14, 2011 said:

I love functional puzzles. I use mine to keep the pieces of my George Hart's 12 Stick Puzzle in. The lid goes about 2/3 of the way down and locks nicely. It's just a brilliant design and never easy to open.

VeryWetPaint on Dec 14, 2011 said:

Judging from the maze in your picture, you built my derivative Thing http://www.thingiverse.com/thi... in which I had swapped the wrong-turns and right-turns as much as I could. (Compare the pictures carefully and you'll see the differences.)

I encourage you to build both versions and compare whether the derivative maze is harder, easier, or just different!

dewoller on Jun 17, 2011 said:

Anytime I try to compile the python generated model with openscad, even the sample, after an interminable compilation duration more appropriate for last century, openscad crashes with an obscure error.

terminate called after throwing an instance of 'CGAL::Assertion_exception'
what(): CGAL ERROR: assertion violation!
Expr: itl != it-
&
gt;second.end()

File: /usr/include/CGAL/Nef_3/SNC_external_structure.h

Line: 1088

Aborted

If you have gotten openscad to compile the python generated program, can you tell me what version of openscad you are using?

Thanks

wizard23 on Oct 10, 2011 said:

oh sorry that happens when you have too sharp corners in the gray scale image and the inset algorithm screws up...either fix the inset code or add some gray scale gradient to avoid sharp cornered small lines that get inset weird...i still love this box idea and hope to find some time to fix the inset code to get rid of these excepion for real but its a little tricky maybe it would be better to uses some existing 2d library for the inset because basic inset is almost trivial (some 2d linear equations need to be solved) but the cornercases complicate everything and well I did not manage the first time I tried...maybe the community is faster than me? ;)

VeryWetPaint on Jul 2, 2011 said:

I intermittently encountered the same error, plus occasional winding errors, when I tried to repair my derivative. The errors go away if you * disable the second polyhedron, but I can't see anything wrong with the Python script that generates it.

Eventually I found a workaround by deleting the second polyhedron and replacing it with a copy of the first polyhedron prefixed with "translate([0,0,0.01]) scale([0.94,0.94,1.0]) " to cut out the hollow interior and offset it very slightly to avoid manifold errors. This gives approximately the sa
me 1.5mm wall thickness as the original Python output.

Another workaround is to delete the second polyhedron with "cylinder(h=80, r=23.4 );" to build a smooth interior wall. That gives a model whose walls vary from 1.5mm to 3.0mm in thickness due to the contours of the maze.

TheRuttmeister on Apr 20, 2011 said:

Have you though about adding knurled ends?

I have trouble gripping the 2 ends!

wizard23 on Oct 10, 2011 said:

excellent idea...you are right they ARE hard to grip and printed knurled things look amazingly beautiful. I was never really satisfied with the boring cylindrical surface.

I might actually do this next xmas...but maybe the community is faster than me ;)

Solarbotics on Mar 13, 2011 said:

Having some problems with getting the outer sleeve made as a more solid unit. Changing the infill property doesn't seem to affect it still being built as an inner and outer sleeve that's not very stiff. Any ideas please?

cyclone on Apr 7, 2011 said:

Set extra shells to 0 in the Fill module.

Anonymous on Dec 28, 2010 said:

would it be really hard to connect all three of the mazes to make one big one that wraps all the way around the part?

wizard23 on Oct 10, 2011 said:

no just adapt the pixel image you feed to the python script. it warps around 3 times the way the python code is now but this is a number you can modify just like the picture :)

Mazzo on Nov 18, 2010 said:

hi Wizard!

thx allot for printing me this amazing showcase-Box 8-)

cya ;)

itcamefrommars on Oct 23, 2010 said:

Awesome design. When I have time I'll try the scripts - printed out the example though!

Was a very tight fit - thank goodness I just installed twotime's z-axis wobble arrest or the path's would have been too bumpy to work smoothly.

I did sand off the z-axis ridges on the "knobs" on the top so it wouldn't have little ridges rubbing ridges.

Thanks for the excellent work!

wizard23 on Jun 14, 2010 said:

on my makerbot it took about 50 minutes to print the larger and 40 minutes to print the smaller part...

mctrivia on Jun 14, 2010 said:

how exactly do you use the script? i put all the files into 1 folder. after reading mazebox_clean2_stable.py i put the png in the playground folder but running mazebox_clean2_stable.py just opens a command window for a second then it closes.

wizard23 on Jun 14, 2010 said:

run it in the command line like this (I think this should even work under windows although I only tested it under ubuntu):
python mazebox clean2 stable.py
&
gt; myBox.scad

You might want to adapt the variables (in the python code):
* "rn" (three times the x resolution of the image),
* "hn" (the y resolution of the image)
* "depth" (the image file)
* "part" (which part to generate)

It's a little bit messy because I had to finish this in time for xmas and did not clean it up afterwards...anyway if there are more questions please ask :)

jon on Jan 27, 2010 said:

Started printing this today on my school's starch and glue based printer, tomorrow I'll see if the thin walls are strong enough on this type of printer.

jon on Jan 30, 2010 said:

It worked alright. I'm guessing that the plastic parts shrink a little because my starch print didn't fit together until I sanded and filed it a little.

MarcusWolschon on Jan 26, 2010 said:

Printed on 0.25mm layer-height on a RepMan.

pattywac on Jan 11, 2010 said:

Had issues with missing png.py module. You can download here: http://code.google.com/p/pypng...

cathalgarvey on Dec 25, 2009 said:

Wow, this is absolutely brilliant! :D
I want one! Must find a source of plastic in Ireland, I'm getting sick of being frugal with ABS..

Zaggo on Dec 23, 2009 said:

Where do I get the missing testpng.py file?

wizard23 on Dec 23, 2009 said:

I forgot it in the first place but II uploaded it now

Fido on Dec 23, 2009 said:

Sweet! I knew something like this was on its way when saw your first lockbox :) Nice work!

wizard23 on Dec 23, 2009 said:

thanks! in the xmas holidays i want to try out many new boxes with different patterns form other images...once it's programed it can be executed may times..the joy of parametric modeling ;)

bre on Dec 23, 2009 said:

OMG so awesome!

Top