Add windshields to side table.

This commit is contained in:
tastytea 2020-08-02 16:53:00 +02:00
parent 02bd00d051
commit 2918b52e24
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07
1 changed files with 123 additions and 2 deletions

View File

@ -24,9 +24,15 @@
* - A rasp
* - A file (optional)
* - Sandpaper
*
* For the windshields:
* - Another kind of lath
* - Magnets from cigarette paper packaging or bolts
*/
/* clang-format off */
include<vendor/roundedcube.scad>;
/* clang-format on */
$fs = 0.1;
@ -41,7 +47,7 @@ leg_width = 4.0; /* x */
leg_depth = 4.0; /* y */
leg_height = table_height - tabletop_height; /* z */
module basic_side_table()
module side_table()
{
echo("Leg height", leg_height);
@ -108,4 +114,119 @@ module basic_side_table()
}
}
basic_side_table();
module windbreaks()
{
thickness = 1; /* x */
height = 4; /* z */
gap = 4; /* z */
margin = leg_width / 4; /* Between edge of tabletop and windbreaks. */
module magnets(length, h = 0.12, d = 0.5)
{
middle = thickness / 2;
for (y = [thickness * 2, length / 2, length - (thickness * 2)])
translate([middle, y, 0])
{
cylinder(h = h, d = d);
}
}
module windbreak(length)
{
difference()
{
color("SandyBrown")
{
cube([thickness, length, height]);
}
magnets(length = length);
}
}
module triangle(points, height)
{
linear_extrude(height)
{
polygon(points);
}
}
module side()
{
translate([0, 0, 0])
{
length = table_depth - (margin * 2);
difference()
{
windbreak(length);
translate([0, length - thickness, 0])
{
triangle(points = [[thickness, 0], [0, thickness],
[thickness, thickness]],
height = 4);
}
}
}
}
module top()
{
translate([margin, table_depth - thickness - margin, 0])
{
length = table_width - (margin * 2);
rotate([0, 0, -90])
{
color("Tan")
{
difference()
{
windbreak(length);
triangle(points =
[
[0, 0], [thickness, thickness],
[thickness, 0]
],
height = 4);
translate([0, length - thickness, 0])
{
triangle(points = [[thickness, 0], [0, thickness],
[thickness, thickness]],
height = 4);
}
}
}
}
}
}
translate([0, margin, table_height + gap])
{
translate([0, 0, gap == 0 ? 0 : height / 2])
{
top();
}
/* Left */
translate([margin, 0, 0])
{
side();
}
/* Right */
translate([table_width - margin, 0, 0])
{
mirror([1, 0, 0])
{
side();
}
}
}
}
side_table();
render()
{
windbreaks();
}