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.
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:
- dimensions The 3d dimensions of the tray.
- thickness The thickness of the tray outside walls (side and bottom) (default:
2
). - curved Whether the tray should be curved or not (default:
true
). - n_columns The number of subdivider columns (default:
1
). - n_rows The number of subdivider rows or an array of length
n_columns
with each itemn_rows[i]
containing the number of rows in columni
(default:1
). - columns An optional 1d array of length
(n_columns-1)
. Should contain numbers in the range [0, ..., 1] that specify where column subdividers should be located as a proportion of the total width (default:false
). - rows An optional array of length
n_columns
. Each elementrows[i]
contains either the valuefalse
(to split that column evenly as specified byn_rows
) or an array of lengthn_rows[i]-1
with numbers in the range [0, ..., 1] that specify where row subdividers should be located as a proportion of the total length of columni
(default:false
). - bottom_thickness The thickness of the bottom wall (default: same as
thickness
). - dividers_height The height of subdividers (should be less than or equal to tray's height) (default: same as tray).
- dividers_thickness The thickness of subdividers (should be less than or equal to tray's thickness) (default: same as tray).
- bottom_bevel_radius Radius of bottom bevel for curved trays (default:
2 x thickness
). - top_bevel_radius Radius of top/sides bevel for curved trays (default:
thickness
). - dividers_bottom_bevel_radius Radius of bottom bevel of subdivisions for curved trays (default: same as
bottom_bevel_radius
) - dividers_top_bevel_radius Radius of top/sides bevel of subdivisions for curved trays (default: same as
top_bevel_radius
). - rows_first Allows to draw the tray priorizing the rows instead of columns. If
true
, arguments for rows and columns are inverted (default:false
).
Simple tray with curved inside (default):
tray([100, 60, 30]);
Tray with equal subdividers (3 columns, 2 rows):
tray([100, 60, 30], n_columns=3, n_rows=2);
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 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]);
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);
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 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]);
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);
Simple tray with different side and bottom thickness:
tray([100, 60, 30], thickness=3, bottom_thickness=20);
Tray with thinner and lower dividers:
tray([100, 60, 30], n_columns=3, n_rows=2, thickness=2, dividers_height=25, dividers_thickness=1);
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);