-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathchair.scad
More file actions
78 lines (60 loc) · 2.07 KB
/
chair.scad
File metadata and controls
78 lines (60 loc) · 2.07 KB
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
//////////////////////////////////////////////////////////////////////////////////OpenSCAD////////////////////////
/*///////////////////////////////////////////////////////
date started: 6/13/2013
date finished:
modeler: Patrick Conner
copyright: N/A
*/
/////////////////////////////////////////////////////////////////////////////////perameters////////////////////////////////////////////////////////////////////////////////
log_radius=5;
chair_height=100;
log_number=4;
//////////////////////////////////////////////////////////////////////////////////renders//////////////////////////////////////////////////////////////////////////////////
back_butt();
translate([log_radius*2*log_number,0,0])
arm();
translate([-log_radius*2*log_number,0,0])
arm(style="scallop");
echo();
//////////////////////////////////////////////////////////////////////////////////modules//////////////////////////////////////////////////////////////////////////////////
module back_butt(){
for(x=[-log_number:1:log_number]){
translate([x*log_radius*2,0,-5])
rotate([5,0,0])
cylinder(chair_height-x*x*3,log_radius,log_radius);
translate([x*log_radius*2,0,0])
rotate([-90,0,0])
cylinder(chair_height-x*x,log_radius,log_radius);
}
}
module arm(style){
translate([0,-sin(5)*chair_height-log_number*log_number+15,cos(5)*chair_height-log_number*log_number*3-5])
difference(){
union(){
rotate([-90,0,0])
cylinder(chair_height-log_number*log_number+5,log_radius,log_radius);
translate([0,chair_height-log_number*log_number,-chair_height-(log_number*log_number)+64])
rotate([5,0,0])
cylinder(chair_height-log_number*log_number-25,log_radius,log_radius);
}
if(style=="scallop"){
scallop();
}
}
}
module scallop(){
ymax=floor(chair_height-log_number*log_number+5);
zmax=floor(chair_height-log_number*log_number-25);
for(y=[0:5:ymax]){
rotate([0,y*90,0])
translate([0,y,5+log_radius/2])
sphere(5);
}
translate([0,ymax-4,-zmax])
rotate([5,0,0])
for(z=[0:5:zmax]){
rotate([0,0,z*90])
translate([0,5+log_radius/2,z])
sphere(5);
}
}