OpenSCAD Maze Generator

OpenSCAD Maze Generator

thingiverse

Ever need a maze generated for OpenSCAD? If so, then this puppy is for you. It is a Python script which generates a random N x M maze and outputs a 3D description of it as an OpenSCAD program. The number of maze cells as well as the maze's physical size can all be controlled with command line arguments when running the Python script. The Python code can even be modified to generated non-rectangular mazes. (Hint: just throw up non-removable walls in the initialized maze data.) BTW, the Python code here is derived from the Eggbot Maze generator, Eggmazing, which is distributed with the Eggbot software and is an Inkscape extension. I wrote that extension for the Eggbot in the Fall of 2010 and want to again thank W. Craig Trader for the assistance he provided with that effort. Enjoy! 9 June 2012: Corrected invalid commenting style in line 1 of OpenSCAD output 9 June 2012: Added warning when wall thickness (-t) is explicitly set to be thicker than one-half the cell's width or length. Instructions Download the maze.py Python script and run it, % python maze.py maze.scad where the last argument, maze.scad, is the name of the output file to generate. The output is an OpenSCAD program which you can then load into OpenSCAD and render. Use whatever file name suits your fancy. If no name is supplied, then the OpenSCAD program is written to standard output, stdout. The command line arguments can be seen with the command % python maze.py --help Usage: maze.py [-cfhlrtw] [output-file] -c, --columns Number of maze columns running the maze width (default = 8) -f, --floor Physical thickness in millimeters of the maze floor (default = 2.000000) -h, --height Physical height in millimeters of the maze (default = 8.000000) -l, --length Physical length in millimeters of the maze (default = 30.000000) -r, --rows Number of maze rows running the maze height (default = 8) -t, --thickness Physical maze wall thickness in millimeters (default = 1.000000) -w, --width Physical width in millimeters of the maze (default = 30.000000) output-file Name of the output file to generated; if not specified then output will be written to standard output The two attached .stl files, maze-8x8.stl and maze-10x10.stl, were both generated with this script.

Download Model from thingiverse

With this file you will be able to print OpenSCAD Maze Generator with your 3D printer. Click on the button and save the file on your computer to work, edit or customize your design. You can also find more 3D designs for printers on OpenSCAD Maze Generator.