-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpark_bench.scad
114 lines (102 loc) · 2.36 KB
/
park_bench.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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
// Park bench ends for coffee stirers
//
// Copyright 2012 John Cooper
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
// Add some smoothing
$fs=0.2;
// Stirer dimentions
st_w=6.5;
st_h=1.4;
// Some useful numbers
height=4;
module back() {
translate([0, st_w * 3.8, 0]) {
rotate([0, 0, 15]) {
difference() {
back_shape();
back_holes();
}
}
}
}
module back_shape() {
union() {
cube([st_h * 5, st_w * 6.5, height]);
translate([st_h, st_w * 6.5,0]){
cylinder(r=st_h * 4, h=height);
}
}
}
module back_holes() {
for ( l = [0,1,2,3] ) {
translate([st_h * 2, st_w * ( 1.6 * l + 0.5 ), -0.5]) {
cube([st_h, st_w, height+1]);
}
}
}
module leg_back() {
difference() {
translate([-st_h, 0, 0]) {
rotate([0, 0, -5]) {
cube([st_h * 5, st_w * 3.8, height]);
}
}
// Cut the bottom of the leg off flat
translate([-st_w * 2, -st_w * 4, -height]) {
cube([st_w * 4, st_w * 4,height * 3]);
}
}
}
module leg_front() {
difference() {
translate([st_w * 6, 0, 0]) {
rotate([0, 0, 5]) {
cube([st_h * 5, st_w * 4, height]);
}
}
translate([st_w * 4, -st_w * 4, -height]) {
cube([st_w * 4, st_w * 4,height * 3]);
}
}
}
module seat() {
translate([0, st_w * 3.4, 0]) {
rotate([0, 0, 5]) {
difference() {
seat_shape();
translate([st_w * 0.5, st_h * 5 ,0]) {
rotate([0,0,-90]) {
back_holes();
}
}
}
}
}
}
module seat_shape() {
cube([st_w * 6.5, st_h * 5, height]);
translate([st_w * 6.5, st_h * 1, 0]) {
cylinder(r=st_h * 4, h=height);
}
}
module part() {
union(){
back();
leg_back();
leg_front();
seat();
}
}
part();