Generic Tray Creator Script with rounded bin floors

Generic Tray Creator Script with rounded bin floors Free 3D print model

This is not about a specific model, it's about my python/SolidPython script that creates arbitrary grid trays (with rounded bottoms so there's no corners), useful for organizing lots of small items. Especially nice for creating board game organizers. The script is attached, it is called "generic_tray.py". You run it from the command line with the grid dimensions and it will spit out a .scad file and [optionally] a .stl file. It will also show you the [approximate] volume of each bin. ------ USAGE ------ ***ALL UNITS ARE MILLIMETERS*** The tray will be specified by the dimensions of each row/column, provided as two arrays. The example screenshot shows the terminal after running the tool. Use the following command-line call to create the example in the screenshot (x-axis always first). python generic_tray.py [40,60,35,20] [30,40] Make sure there are no spaces before or after the commas in the lists: You can add extra args to adjust floor- and wall-thickness, bin depth and how rounded you want the bins to be on the bottom: `python generic_tray.py [40,60,35,20] [30,40] --depth=55 --outfile=mytray.scad` Type the following to see all options: `python generic_tray.py --help` *** IF YOU DON'T WANT/CAN'T DO THE COMMAND-LINE THING, then follow the directions towards where CLI_OPTIONS and CLI_ARGS are set in the script. You can remove all the CLI_* code and simply hardcode the tray size into this script so you only have to double-click it to generate the SCAD file. This will automatically generate a .scad file that can be loaded into OpenSCAD. It will always ask if you want to also generate the .stl file, which can be loaded into most 3D printing slicers, but this can be very slow unless you are using --round=0. It is recommended, if you are tweaking the tray dimensions and checking resultant bin volumes, to always skip creating the STL (type nothing, press enter), until you are happy with it, then re-run the last command and type "y" before enter to generate the .stl. *NOTE*: Read the README.txt, and note that if you need precise bin sizes, calibrate your printer using my calibration cubes and create a caldata.py file. SETUP ------ The requirements to use generic_tray.py is: Python 2.X OpenSCAD SolidPython (python wrapper around OpenSCAD) (1) You must install the latest Python 2.X, currently python 2.7.8 if you are in Windows (comes installed by default in Linux & OSX) DO NOT install python 3.X -- this only works with python2.X: https://www.python.org/downloads/ (2) You need to have OpenSCAD installed. The script always generates a .scad file, which requires OpenSCAD for viewing and/or converting to STL format. In Ubuntu, install openscad through the pkg manager: sudo apt-get install openscad Otherwise, download it from here: http://www.openscad.org/downloads.html Even if you don't use the OpenSCAD application, you must have OpenSCAD available so that the script can use it to generate the STL files. The script assumes that "openscad" program/exe is in your PATH. If it isn't, you may need to adjust the generic_tray.py script to call the full path to openscad or openscad.exe. (3) SolidPython is required for the generic_tray.py script to be able to generate .scad files. Generally speaking, you can use OpenSCAD by itself to make 3D models, but the SCAD "language" is weak and extremely limited in functionality. SolidPython is a python library that lets you create your models in python (using proper variables, loops, etc), and it generates simple SCAD for you. Get SolidPython from here: https://github.com/SolidCode/SolidPython You can simply copy the "solid" directory into your project directory (so that the generic_tray.py script can call "import solid" and it will find ./solid/__init__.py). Or within the outer SolidPython directory, you can run "sudo python setup.py install". This will install the "solid" directory into your global site-packages directory so that it will be available no matter where you run generic_tray.py.

Item rating
0 0
Generic Tray Creator Script with rounded bin floors
Free
 
Custom License 
Generic Tray Creator Script with rounded bin floors
Free
 
Custom License 
Response - % in - h

3D Model formats

Format limitations
  • Stereolithography (.stl) (3 files)5.07 MB
  • Other 16.1 KB

3D Model details

  • Publish date2014-09-29
  • Model ID#81789
Help