93ed2a45 |
1 | $fn = 100; |
2 | |
3 | head_top_inner_radius = 76; |
4 | band_top_width = 5; |
5 | band_thickness = 3; |
6 | head_top_outer_radius = head_top_inner_radius + band_thickness; |
7 | buffer=10; |
8 | band_height = 127; |
9 | |
10 | head_side_inner_radius = 127; |
11 | head_side_outer_radius = head_side_inner_radius + band_thickness; |
12 | |
13 | module hairband() { |
14 | |
15 | difference() { |
16 | |
17 | difference() { |
18 | |
19 | union() { |
20 | difference() { |
21 | cylinder(r=head_top_outer_radius, h=band_top_width, center=true); |
22 | cylinder(r=head_top_inner_radius, h=band_top_width+buffer, center=true); |
23 | } |
24 | |
25 | translate([head_side_outer_radius - head_top_outer_radius,0,0]) |
26 | difference() { |
27 | cylinder(r=head_side_outer_radius, h=band_top_width, center=true); |
28 | cylinder(r=head_side_inner_radius, h=band_top_width+buffer, center=true); |
29 | } |
30 | |
31 | translate([-(head_side_outer_radius - head_top_outer_radius),0,0]) |
32 | difference() { |
33 | cylinder(r=head_side_outer_radius, h=band_top_width, center=true); |
34 | cylinder(r=head_side_inner_radius, h=band_top_width+buffer, center=true); |
35 | } |
36 | } |
37 | |
38 | difference() { |
39 | translate([-(head_side_outer_radius - head_top_outer_radius),0,0]) |
40 | cylinder(r=head_side_inner_radius, center=true, h=band_top_width+buffer); |
41 | translate([-head_side_outer_radius, -0, 0]) |
42 | cube([head_side_outer_radius*2, head_side_outer_radius*2, band_top_width+buffer*2], center=true); |
43 | translate([0, head_side_outer_radius/2, 0]) |
44 | cube([head_side_outer_radius*2, head_side_outer_radius, band_top_width+buffer*2], center=true); |
45 | } |
46 | |
47 | difference() { |
48 | translate([(head_side_outer_radius - head_top_outer_radius),0,0]) |
49 | cylinder(r=head_side_inner_radius, center=true, h=band_top_width+buffer); |
50 | translate([head_side_outer_radius, 0, 0]) |
51 | cube([head_side_outer_radius*2, head_side_outer_radius*2, band_top_width+buffer*2], center=true); |
52 | translate([0, head_side_outer_radius/2, 0]) |
53 | cube([head_side_outer_radius*2, head_side_outer_radius, band_top_width+buffer*2], center=true); |
54 | } |
55 | |
56 | translate([0, -band_height, 0]) |
57 | cube([head_side_inner_radius*2, head_side_inner_radius, band_top_width+buffer*2], center=true); |
58 | |
59 | } |
60 | |
61 | |
62 | difference() { |
63 | cylinder(r=head_side_outer_radius*2+buffer, h=band_top_width+buffer, center=true); |
64 | |
65 | cylinder(r=head_top_outer_radius, center=true, h=band_top_width+buffer*3); |
66 | intersection() { |
67 | translate([head_side_outer_radius - head_top_outer_radius,0,0]) |
68 | cylinder(r=head_side_outer_radius, h=band_top_width+buffer*3, center=true); |
69 | translate([-head_top_outer_radius+buffer/2,-head_top_outer_radius,0]) |
70 | cube([head_top_outer_radius+buffer,head_top_outer_radius*2,band_top_width+buffer*3], center=true); |
71 | } |
72 | intersection() { |
73 | translate([-(head_side_outer_radius - head_top_outer_radius),0,0]) |
74 | cylinder(r=head_side_outer_radius, h=band_top_width+buffer*3, center=true); |
75 | translate([head_top_outer_radius+buffer,-head_top_outer_radius,0]) |
76 | cube([head_top_outer_radius+buffer,head_top_outer_radius*2,band_top_width+buffer*3], center=true); |
77 | } |
78 | } |
79 | } |
80 | } |
81 | |
82 | hairband(); |
83 | |
84 | module ears() { |
85 | translate([0, 0, - band_top_width / 2]) { |
86 | rotate([90,0,30]) { |
87 | translate([-0.2, 0, 1]) { |
88 | linear_extrude(height=58.5) { |
89 | square([band_thickness, band_top_width]); |
90 | } |
91 | } |
92 | } |
93 | rotate([90,0,-30]) { |
94 | linear_extrude(height=57.5) { |
95 | square([band_thickness, band_top_width]); |
96 | } |
97 | } |
98 | |
99 | translate([band_thickness/2, 0, 0]) |
100 | cylinder(h=band_top_width, r=band_thickness/2); |
101 | } } |
102 | |
103 | translate([-57, 17, 0]) { |
104 | rotate([0, 0, 30]) { |
105 | translate([head_top_outer_radius/2, head_top_outer_radius, 0]) |
106 | ears(); |
107 | } |
108 | } |
109 | |
110 | mirror([200, 0, 0]) { |
111 | translate([-57, 17, 0]) { |
112 | rotate([0, 0, 30]) { |
113 | translate([head_top_outer_radius/2, head_top_outer_radius, 0]) |
114 | ears(); |
115 | } |
116 | } |
117 | } |