-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathchair.scad
93 lines (86 loc) · 2.11 KB
/
chair.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
free_width=12;
table_height=11.6;
module chairHolder(hole_diametre, depth) {
solid_width=free_width/2;
hole_radius=hole_diametre/2;
empty=1;
union(){
translate([solid_width/2,0,0]){
cube([solid_width,depth,hole_diametre], true); //solid
}
translate([solid_width,0,0]){
difference(){ //solid with hole
translate([hole_radius/2,0,0]){
cube([hole_radius,depth,hole_diametre], true);
}
translate([hole_radius,0,0]){
rotate([90,0,0]){
$fn=100;
cylinder(depth+empty,hole_radius,hole_radius,true);
}
}
}
}
}
}
module chairHolderThikness(hole_diametre, depth, thickness,extra_long){
solid_width=free_width/2;
long=solid_width+(hole_diametre/2)+extra_long;
translate([0,-depth/2,hole_diametre/2]){
cube([long,depth,thickness]);
}
translate([0,-depth/2,-hole_diametre/2-thickness]){
cube([long,depth,thickness]);
}
}
module nail(){
translate([-14/2+4,0,0]){
rotate([0,90,0]){
cylinder(14,7/2,7.6/2,true);
}
}
}
module chairNails(){
translate([0,20,0]){
nail();
}
translate([0,-20,0]){
nail();
}
}
module supports(thick, hole){
depth=70;
wide=10-hole;
translate([-wide-hole,0,-thick/2]){
translate([0,-depth/2,0]){
cube([wide,11-hole,thick]);
}
long=32-(2*hole);
translate([0,-long/2,0]){
cube([wide,long,thick]);
}
}
}
module roundSurface(){
rotate([0,90,0]){
translate([0,23.5,0]){
cylinder(24,10,10,true);
}
translate([0,-23.5,0]){
cylinder(24,10,10,true);
}
}
cube([24,47,20],true);
}
extra=0;
hole_diametre=table_height + extra;
depth=70;
intersection(){
roundSurface();
union(){
chairHolder(hole_diametre, depth);
chairHolderThikness(hole_diametre, depth, 4, 2);
chairNails();
//supports(2,0.5);
}
}