sofian / openscad-tray

OpenSCAD library to create rounded rectangular trays with optional subdividers.
GNU General Public License v3.0
38 stars 8 forks source link

OpenSCAD Tray Library

Allows the design of trays with optional subdivisions. Many different configuration options available.

Designed to quickly create trays with different configurations, for efficient storing of parts, such as hardware, small tools, board game inserts, etc.

Table of Contents

Usage

In order to use, simply install in your OpenSCAD library folder and include the file tray.scad:

include <tray.scad>

You can then use the function tray() which comes with many different options.

tray(dimensions, thickness=2, curved=true,
    n_columns=1, n_rows=1, columns=false, rows=false,
    bottom_thickness=undef,
    dividers_height=undef, dividers_thickness=undef,
    bottom_bevel_radius=undef, top_bevel_radius=undef,
    dividers_bottom_bevel_radius=undef, dividers_top_bevel_radius=undef,
    rows_first=false)

Arguments:

Examples

Basics

Simple tray

Simple tray with curved inside (default):

tray([100, 60, 30]);

tray_example_basic

Simple subdivisions

Tray with equal subdividers (3 columns, 2 rows):

tray([100, 60, 30], n_columns=3, n_rows=2);

tray_example_subdividers_equal

Column subdivisions of unequal size

Tray with unequal subdividers (3 columns, 2 rows). First and last columns are at 25% of width from each side.

tray([100, 60, 30], n_columns=3, n_rows=2, columns=[0.25, 0.75]);

tray_example_subdividers_unequal

Subdivisions with different numbers of rows per column

Tray with unequal number of rows per column, equally distributed: first column has 4 rows, second column has 2 rows and final column as 3 rows.

tray([100, 60, 30], n_columns=3, n_rows=[4,2,3]);

tray_example_subdividers_unequal_n_rows

Same but with unequal number of columns per row, equally distributed.

tray([100, 60, 30], n_rows=3, n_columns=[4,2,3], rows_first=true);

tray_example_subdividers_unequal_n_columns

Advanced subdivisions

Unequal subdivisions for both rows and columns

Traw with unequal subdividers (3 columns, 2 rows). First and last columns are at 25% of width from each side. Rows in first and last column are equally distributed but first row of middle column occupies only one third of length.

tray([100, 60, 30], n_columns=3, n_rows=2, columns=[0.25, 0.75], rows=[false, [1/3], false]);

tray_advanced_example1

Subdivisions with different numbers of rows per column (specific distribution)

Tray with unequal number of rows per column: first column has 4 rows, second column has 2 rows and final column as 3 rows. First and last columns are at 25% of width from each side. Rows in first and last column are equally distributed but the first two rows of middle column each occupyp 25% of column length.

tray([100, 60, 30], n_columns=3, n_rows=[4,3,2], columns=[0.25, 0.75], rows=[false, [0.25, 0.5], false]);

tray_advanced_example2

Same but with unequal number of columns per row.

tray([100, 60, 30], n_rows=3, n_columns=[4,3,2], rows=[0.25, 0.75], columns=[false, [0.25, 0.5], false], rows_first=true);

tray_advanced_example3

Options

Thickness

Simple tray with different side and bottom thickness:

tray([100, 60, 30], thickness=3, bottom_thickness=20);

tray_example_thickness

Divider options

Tray with thinner and lower dividers:

tray([100, 60, 30], n_columns=3, n_rows=2, thickness=2, dividers_height=25, dividers_thickness=1);

tray_example_subdividers_options

Bevel options

Same but with larger bevel radius at top and bottom:

tray([100, 60, 30], n_columns=3, n_rows=2, thickness=2, dividers_height=25, dividers_thickness=1,
     top_bevel_radius=6, bottom_bevel_radius=10, 
     dividers_top_bevel_radius=3, dividers_bottom_bevel_radius=10);

Untitled