-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgarage-table-actual.scad
96 lines (71 loc) · 3.25 KB
/
garage-table-actual.scad
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
$fa = 1;
$fs = 0.4;
leg_width=20;
leg_length=20;
leg_height=700;
top_width=400;
top_length=1000;
top_thickness=30;
support_width=20;
support_length=20;
//support_height=top_length;
module square_tube(tube_width=50, tube_length=50, tube_height=700, wall_thickness=16){
inside_width = tube_width-wall_thickness;
inside_length = tube_length-wall_thickness;
translate([0,0,tube_height/2]){
difference(){
cube([tube_width, tube_length, tube_height], center=true);
translate([0,0,-0.5])
scale([1,1,1.10])
cube([inside_width,inside_length,tube_height], center=true);
}}
}
module flat_surface(surface_width=400, surface_length=1000,surface_thickness=20, surface_height){
translate([0,0,surface_height])
cube([surface_width, surface_length, surface_thickness],center=true);
}
// Table Legs
short_side=(top_width/2)-(leg_width/2);
long_side=(top_length/2)-(leg_length/2);
// Back
translate ([-short_side,long_side,0])
square_tube(tube_width=leg_width, tube_length=leg_length, tube_height=leg_height);
translate ([-short_side,-long_side,0])
square_tube(tube_width=leg_width, tube_length=leg_length, tube_height=leg_height);
// Front
translate ([short_side,long_side,0])
square_tube(tube_width=leg_width, tube_length=leg_length, tube_height=leg_height);
translate([short_side,-long_side,0])
square_tube(tube_width=leg_width, tube_length=leg_length, tube_height=leg_height);
// Table Surface
flat_surface(surface_width=top_width, surface_length=top_length, surface_height=leg_height+(top_thickness/2), surface_thickness=top_thickness);
// Supports
// Front
rotate([90,0,0]){
translate([top_width/2-support_width/2,top_width/2,(-top_length/2)+(leg_length)])
square_tube(tube_width=support_width, tube_length=support_length, tube_height=top_length-(2*leg_length));
// Back
translate([-(top_width/2-support_width/2),top_width/2,(-top_length/2)+(leg_length)])
square_tube(tube_width=support_width, tube_length=support_length, tube_height=top_length-(2*leg_length));}
// Side
rotate([90,0,90]){
translate([-top_length/2+leg_width/2,top_width/2,(-top_width/2)+(leg_width)])
square_tube(tube_width=support_width, tube_length=support_length, tube_height=top_width-(2*leg_width));
// Side 2
translate([top_length/2-leg_width/2,top_width/2,(-top_width/2)+(leg_width)])
square_tube(tube_width=support_width, tube_length=support_length, tube_height=top_width-(2*leg_width));}
// Supports Under Top
// Front
rotate([90,0,0]){
translate([top_width/2-support_width/2,top_width/2,(-top_length/2)+(leg_length)])
square_tube(tube_width=support_width, tube_length=support_length, tube_height=leg_height);
// Back
translate([-(top_width/2-support_width/2),top_width/2,(-top_length/2)+(leg_length)])
square_tube(tube_width=support_width, tube_length=support_length, tube_height=top_length-(2*leg_length));}
// Side
rotate([90,0,90]){
translate([-top_length/2+leg_width/2,top_width/2,(-top_width/2)+(leg_width)])
square_tube(tube_width=support_width, tube_length=support_length, tube_height=top_width-(2*leg_width));
// Side 2
translate([top_length/2-leg_width/2,top_width/2,(-top_width/2)+(leg_width)])
square_tube(tube_width=support_width, tube_length=support_length, tube_height=top_width-(2*leg_width));}