From: Jan "Yenya" Kasprzak Date: Wed, 2 Dec 2020 07:28:08 +0000 (+0100) Subject: first version X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=commitdiff_plain;ds=sidebyside;h=e87b72afb560da1ca04c4ee7a3db1e39c4973443;p=things.git first version --- diff --git a/kitchen-bar-hook.scad b/kitchen-bar-hook.scad new file mode 100644 index 0000000..fd6220f --- /dev/null +++ b/kitchen-bar-hook.scad @@ -0,0 +1,70 @@ +// hook for the aluminium kitchen bar from IKEA + +infty=200; +eps=0.01; + +bar_w = 3.5 + 0.7; +bar_h = 29.3 + 0.5; +bar_to_wall = 27; // incl. the bar itself + +wall = 3.1; +upper_overhang = 10.0 - wall; +lower_overhang = 2.0; + +body_h = 10; + +clip_front = 5; // stronger than wall for this object + +// coordinates: front end of the bar is the xz plane, centered by the x axis, +// +x is the upper part, -x is lower, +y is front + +module clip(body_h) { + // front part + translate([-bar_h/2-wall, 0, 0]) + cube([bar_h + 2*wall, clip_front, body_h]); + // upper and lower horizontal bars + for (x = [-1, 1]) scale([x, 1, 1]) + translate([bar_h/2, -bar_w -wall, 0]) + cube([wall, bar_w + 2*wall, body_h]); + // upper overhang + translate([bar_h/2-upper_overhang, -bar_w-wall, 0]) + cube([upper_overhang + wall, wall, body_h]); + // lower overhang + translate([-bar_h/2-wall, -bar_w-wall, 0]) + difference() { + cube([lower_overhang + wall, wall, body_h]); + translate([lower_overhang + wall, 2*wall/3, 0]) + rotate([0, 0, -45]) + translate([0, -infty/2, -infty/2]) + cube(infty); + } +} + +// make the top of the clip be at x = 0 +translate([-bar_h/2-wall, 0, 0]) + clip(body_h); + +top_len = 50; +hook_y = 30; +hook_base_w = 10; +hook_xoff = 10; // from the top +hook_end_l = 2; + +translate([-eps, -bar_w-wall, 0]) + hull() { + cube([eps, clip_front + bar_w + wall, body_h]); + translate([top_len-eps, 0, 0]) + cube([eps, wall, body_h]); + } + +hull() { + translate([top_len-wall, hook_y, 0]) + cube([wall, eps, body_h]); + translate([top_len-hook_xoff-hook_base_w, -bar_w-wall, 0]) + cube([hook_base_w, eps, body_h]); +} + +translate([top_len-wall, hook_y-wall, 0]) + cube([wall+hook_end_l, wall, body_h]); + +