update with actual dimensions

This commit is contained in:
wardwouts 2024-06-16 11:06:39 +02:00
parent 1bfe2187d1
commit 3786b1ee9e
10 changed files with 54 additions and 35 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 8.5 KiB

Before After
Before After

View file

@ -6,24 +6,29 @@ use <horizontal_outside.scad>
use <vertical_outside.scad>
use <back_plane.scad>
for (i=[1:nr_cells_vertical-1]){
translate([0, -outer_incut, 0]){
for (i=[1:nr_cells_vertical-1]){
translate([0, 0, cell_height*i])
horizontal_slat();
}
}
for (i=[1:nr_cells_horizontal-1]){
translate([0, 0, -outer_incut]){
for (i=[1:nr_cells_horizontal-1]){
translate([0, cell_width*i, 0])
vertical_slat();
}
}
translate([0, -(outer_thickness-outer_incut), 0])
translate([0, -(outer_thickness), 0])
vertical_outside();
translate([0, cell_width*nr_cells_horizontal-outer_incut, 0])
translate([0, cell_width*nr_cells_horizontal, 0])
vertical_outside();
horizontal_outside();
translate([0, 0, cell_height*nr_cells_vertical + outer_thickness - 2*outer_incut])
translate([0, 0, -outer_thickness])
horizontal_outside();
translate([0, 0, cell_height*nr_cells_vertical])
horizontal_outside();
translate([-back_thickness, -(outer_thickness - outer_incut), -(outer_thickness)])
translate([-back_thickness, -(outer_thickness), -(outer_thickness)])
back_plane_fancy();

View file

@ -1,17 +1,16 @@
include <dimensions.scad>
include <functions.scad>
module back_plane(){
color("lightblue")
cube(size=[back_thickness, 2*outer_thickness - 2*outer_incut + cell_width * nr_cells_horizontal, 2*outer_thickness - 2*outer_incut + cell_height * nr_cells_vertical], center=false);
echo("#### Back: thickness = ", back_thickness, " height = ", 2*outer_thickness - 2*outer_incut + cell_height * nr_cells_vertical, "width = ", 2*outer_thickness - 2*outer_incut + cell_width * nr_cells_horizontal);
cuben("Back", size=[back_thickness, 2*outer_thickness + cell_width * nr_cells_horizontal, 2*outer_thickness + cell_height * nr_cells_vertical]);
}
back_plane();
module back_plane_fancy(){
color("lightblue")
cube(size=[back_thickness, 2*outer_thickness - 2*outer_incut + cell_width * nr_cells_horizontal, 2*outer_thickness - 2*outer_incut + cell_height * nr_cells_vertical + back_fancy_height], center=false);
echo("#### Fancy back: thickness = ", back_thickness, " height = ", 2*outer_thickness - 2*outer_incut + cell_height * nr_cells_vertical + back_fancy_height, "width = ", 2*outer_thickness - 2*outer_incut + cell_width * nr_cells_horizontal);
cuben("Fancy back", size=[back_thickness, 2*outer_thickness + cell_width * nr_cells_horizontal, 2*outer_thickness + cell_height * nr_cells_vertical + back_fancy_height]);
}
back_plane_fancy();

View file

@ -13,6 +13,6 @@ slat_depth = 40;
back_thickness = 4;
back_fancy_height = 50;
outer_thickness = 6;
outer_incut = 2;
outer_thickness = 12;
outer_incut = 5;
outer_depth = slat_depth;

View file

@ -0,0 +1,17 @@
// input : list of numbers
// output : sorted list of numbers
function quicksort(arr) = !(len(arr)>0) ? [] : let(
pivot = arr[floor(len(arr)/2)],
lesser = [ for (y = arr) if (y < pivot) y ],
equal = [ for (y = arr) if (y == pivot) y ],
greater = [ for (y = arr) if (y > pivot) y ]
) concat(
quicksort(lesser), equal, quicksort(greater)
);
module cuben(name, size){
cube(size=size, center=false);
// sizes should be ordered biggest to smallest
size_sorted=quicksort(size);
echo(str("#### ", name, ": " , size_sorted[2], "x", size_sorted[1], "x", size_sorted[0]));
};

View file

@ -1,11 +1,10 @@
include <dimensions.scad>
include <functions.scad>
module horizontal_outside(){
color("yellow")
translate([0, 0, -outer_thickness])
cube(size=[outer_depth, cell_width * nr_cells_horizontal, outer_thickness], center=false);
cuben(" Horizontal outside", size=[outer_depth, cell_width * nr_cells_horizontal, outer_thickness]);
echo("#### Horizontal outside: length = ", cell_width * nr_cells_horizontal , " depth = ", outer_depth, "thickness = ", outer_thickness);
}
horizontal_outside();

View file

@ -1,11 +1,11 @@
include <dimensions.scad>
include <functions.scad>
module horizontal_slat(){
color("pink")
translate([0, 0, -slat_thickness/2])
cube(size=[slat_depth, cell_width * nr_cells_horizontal, slat_thickness], center=false);
cuben("Horizontal slat", size=[slat_depth, 2*outer_incut + cell_width * nr_cells_horizontal, slat_thickness]);
echo("#### Horizontal slat: length = ", cell_width * nr_cells_horizontal , " depth = ", slat_depth, "thickness = ", slat_thickness);
}
horizontal_slat();

View file

@ -1,6 +1,6 @@
0 x
1 x ECHO: "#### Fancy back: thickness = ", 4, " height = ", 308, "width = ", 308
2 x ECHO: "#### Horizontal outside: length = ", 300, " depth = ", 40, "thickness = ", 6
4 x ECHO: "#### Horizontal slat: length = ", 300, " depth = ", 40, "thickness = ", 4
2 x ECHO: "#### Vertical outside: length = ", 262, " depth = ", 40, "thickness = ", 6
5 x ECHO: "#### Vertical slat: length = ", 250, " depth = ", 40, "thickness = ", 4
2 x ECHO: "#### Horizontal outside: 300x40x12"
1 x ECHO: "#### Fancy back: 324x324x4"
4 x ECHO: "#### Horizontal slat: 310x40x4"
2 x ECHO: "#### Vertical outside: 274x40x12"
5 x ECHO: "#### Vertical slat: 260x40x4"

View file

@ -1,11 +1,11 @@
include <dimensions.scad>
include <functions.scad>
module vertical_outside(){
color("green")
translate([0, 0, -outer_thickness])
cube(size=[outer_depth, outer_thickness, (cell_height * nr_cells_vertical) + (2*outer_thickness) - 2*outer_incut], center=false);
echo("#### Vertical outside: length = ", (cell_height * nr_cells_vertical) + (2*outer_thickness) , " depth = ", outer_depth, "thickness = ", outer_thickness);
translate([0, 0, -outer_thickness]) {
cuben("Vertical outside", size=[outer_depth, outer_thickness, (cell_height * nr_cells_vertical) + (2*outer_thickness) ]);
}
}
vertical_outside();

View file

@ -1,11 +1,10 @@
include <dimensions.scad>
include <functions.scad>
module vertical_slat(){
color("red")
translate([0, 0, -slat_thickness/2])
cube(size=[slat_depth, slat_thickness, cell_height * nr_cells_vertical], center=false);
echo("#### Vertical slat: length = ", cell_height * nr_cells_vertical , " depth = ", slat_depth, "thickness = ", slat_thickness);
translate([0, -slat_thickness/2, 0 ])
cuben("Vertical slat", size=[slat_depth, slat_thickness, 2*outer_incut + cell_height * nr_cells_vertical]);
}
vertical_slat();