]> www.fi.muni.cz Git - things.git/blob - ikea-kitchen-bar.scad
ikea-kitchen-bar-clip: first version
[things.git] / ikea-kitchen-bar.scad
1 // hook for the aluminium kitchen bar from IKEA
2
3 infty=100;
4 eps=0.01;
5
6 bar_w = 3.5 + 0.5;
7 bar_h = 29.3 + 0.5;
8
9 wall = 3.1;
10 upper_overhang = 10.0 - wall;
11 lower_overhang = 1.5;
12
13 body_h = 12;
14
15 // coordinates: front end of the bar is the xz plane, centered by the x axis,
16 // +x is the upper part, -x is lower, +y is front
17
18 module clip() {
19         // front part
20         translate([-bar_h/2-wall, 0, 0])
21                 cube([bar_h + 2*wall, wall, body_h]);
22         // upper and lower horizontal bars
23         for (x = [-1, 1]) scale([x, 1, 1])
24                 translate([bar_h/2, -bar_w -wall, 0])
25                         cube([wall, bar_w + 2*wall, body_h]);
26         // upper overhang
27         translate([bar_h/2-upper_overhang, -bar_w-wall, 0])
28                 cube([upper_overhang + wall, wall, body_h]);
29         // lower overhang
30         translate([-bar_h/2-wall, -bar_w-wall, 0])
31                 difference() {
32                         cube([lower_overhang + wall, wall, body_h]);
33                         translate([lower_overhang + wall, 2*wall/3, 0])
34                                 rotate([0, 0, -36])
35                                         translate([0, -infty/2, -infty/2])
36                                         cube(infty);
37                 }
38 }
39
40 // holder for the magnetic knife bar based on the above clip
41
42 front_w = 6;
43 screw_hole = 3;
44 bolt_hole = 7;
45
46 difference() {
47         union() {
48                 clip();
49                 translate([-bar_h/2-wall, 0, 0])
50                         cube([bar_h + 2*wall, front_w, body_h]);
51         }
52
53         // screw hole
54         translate([0, -infty/2, body_h/2])
55                 rotate([-90, 0, 0])
56                 cylinder(r = screw_hole/2, h=infty, $fn = 6);
57         // bolt hole
58         translate([0, front_w/2, body_h/2])
59                 rotate([-90, 0, 0])
60                 cylinder(r = bolt_hole/2, h=infty, $fn = 6);
61 }