]> www.fi.muni.cz Git - things.git/blob - ikea-kitchen-bar.scad
ikea-kitchen-bar.scad: alternative version
[things.git] / ikea-kitchen-bar.scad
1 // hook for the aluminium kitchen bar from IKEA
2
3 infty=200;
4 eps=0.01;
5
6 bar_w = 3.5 + 0.7;
7 bar_h = 29.3 + 0.8;
8 bar_to_wall = 24; // incl. the bar itself
9
10 wall = 3.1;
11 upper_overhang = 10.0 - wall;
12 lower_overhang = 1.5;
13
14 body_h = 12;
15
16 // coordinates: front end of the bar is the xz plane, centered by the x axis,
17 // +x is the upper part, -x is lower, +y is front
18
19 module clip() {
20         // front part
21         translate([-bar_h/2-wall, 0, 0])
22                 cube([bar_h + 2*wall, wall, body_h]);
23         // upper and lower horizontal bars
24         for (x = [-1, 1]) scale([x, 1, 1])
25                 translate([bar_h/2, -bar_w -wall, 0])
26                         cube([wall, bar_w + 2*wall, body_h]);
27         // upper overhang
28         translate([bar_h/2-upper_overhang, -bar_w-wall, 0])
29                 cube([upper_overhang + wall, wall, body_h]);
30         // lower overhang
31         translate([-bar_h/2-wall, -bar_w-wall, 0])
32                 difference() {
33                         cube([lower_overhang + wall, wall, body_h]);
34                         translate([lower_overhang + wall, 2*wall/3, 0])
35                                 rotate([0, 0, -36])
36                                         translate([0, -infty/2, -infty/2])
37                                         cube(infty);
38                 }
39 }
40
41 // holder for the magnetic knife bar based on the above clip
42
43 front_w = 9;
44 screw_hole = 5;
45 bolt_hole = 9;
46 bolt_depth = 4;
47 knifebar_w = 45; // for an alternative design
48 knifebar_w_big = 47.5 + 0.7;
49 knifebar_d = 17.7;
50 screw_l = 8.5;
51
52 /*
53 // first version
54 difference() {
55         union() {
56                 clip();
57                 translate([-bar_h/2-wall, 0, 0])
58                         cube([bar_h + 2*wall, front_w, body_h]);
59         }
60
61         // screw hole
62         translate([0, -infty/2, body_h/2])
63                 rotate([-90, 0, 0])
64                 cylinder(r = screw_hole/2, h=infty, $fn = 6);
65         // bolt hole
66         translate([0, bolt_depth, body_h/2])
67                 rotate([90, 0, 0])
68                 cylinder(r = bolt_hole/2, h=infty, $fn = 6);
69 }
70
71 */
72
73 clip();
74
75 knifebar_x_off = -bar_h/2-wall-8;
76 knifebar_y_off = -knifebar_d + 2*wall;
77 knifebar_rear_wall = 5;
78
79 // top
80 hull() {
81         translate([-bar_h/2-wall, -bar_w -wall, 0])
82                         cube([wall, bar_w + 2*wall, body_h]);
83         translate([knifebar_x_off, knifebar_y_off-knifebar_rear_wall, 0])
84                 cube([wall, -knifebar_y_off+wall+knifebar_rear_wall, body_h]);
85         // translate([knifebar_x_off, knifebar_y_off-knifebar_rear_wall, 0])
86         //      cube([wall, knifebar_rear_wall, body_h]);
87 }
88
89 // rear
90 difference() {
91         translate([knifebar_x_off-knifebar_w_big+wall, knifebar_y_off-knifebar_rear_wall, 0])
92                 cube([knifebar_w_big, knifebar_rear_wall, body_h]);
93         translate([knifebar_x_off-knifebar_w_big/2, 0, body_h/2])
94                 rotate([90, 0, 0])
95                         cylinder(r = screw_hole/2, h = infty, $fn = 6);
96 }
97
98 // bottom support to the wall
99 translate([knifebar_x_off-knifebar_w_big+wall, -bar_to_wall, 0])
100         cube([wall, bar_to_wall+knifebar_y_off, body_h]);
101
102
103 /*
104 // the bar itself
105 # translate([knifebar_x_off-knifebar_w_big, knifebar_y_off, 0])
106         cube([knifebar_w_big, knifebar_d, body_h]);
107
108 // wall
109 # translate([-infty/2, -bar_to_wall, 0])
110         cube([infty, eps, body_h]);
111
112 */