Skip to content

Instantly share code, notes, and snippets.

@patmandenver
Created April 3, 2018 21:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save patmandenver/9e2108ae0b7d0aa9e146e7b7d309bbba to your computer and use it in GitHub Desktop.
Save patmandenver/9e2108ae0b7d0aa9e146e7b7d309bbba to your computer and use it in GitHub Desktop.
$fn=100;
//Rows
rows = 3;
//How many paint slots per row
per_row = 2;
//How much higher a row is
//above the prior row
row_height_gain=12;
//Settings
dia = 52; //35 for 2fl oz bottles
//52 for 8fl oz bottles
side = dia + 5; //
depth = 14;
height = depth + 3;
for(y=[0:rows-1]){
translate([0,y*side,0])
create_row(y);
}
module create_row(row_num){
difference() {
cube([per_row*side,side,
height + row_height_gain*row_num]);
for(x = [0:per_row - 1]){
translate([x*side + side/2,side/2,
//height-depth+(row_num - 1)*height]){
height-depth + (row_num)*row_height_gain]){
cylinder(depth,d=dia);
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment