diff options
Diffstat (limited to 'body/holes.scad')
| -rw-r--r-- | body/holes.scad | 75 |
1 files changed, 74 insertions, 1 deletions
diff --git a/body/holes.scad b/body/holes.scad index 83d3777..a764dc7 100644 --- a/body/holes.scad +++ b/body/holes.scad @@ -19,6 +19,8 @@ m2_head_diameter = 3.75; m2_head_height = 1.9; m2 = 2; +padding_around_insert = 2; + // gw - glass width // gh - glass height // gt - glass thickness @@ -144,13 +146,84 @@ module screw_hole(m, id, il, hd, hh, hs, wt = $scannerBodyWallThicknessMm) } } +function padded_hole_d(hd = 4) = + hd + padding_around_insert * 2; + +// h - height +// hd - hole diameter +// TODO: support usual holes, not only hot inserts +module hole_holder(h, hd = 4) +{ + d = padded_hole_d(hd); + cube_size = [d * 2, d / 2, h]; + + rotate([90, 0, 90]) + translate([0, d / 2, -h / 2]) + difference() + { + union() + { + cylinder($fn = dToFn(d), d = d, h = h); + + translate([0, -cube_size[1] / 2, h / 2]) + cube(cube_size, center = true); + } + + union() + { + translate([-d, 0, -$tiny_padding]) + cylinder($fn = dToFn(d), d = d, h = h + $tiny_padding * 2); + translate([d, 0, -$tiny_padding]) + cylinder($fn = dToFn(d), d = d, h = h + $tiny_padding * 2); + } + } +} + +// h - height +// hd - hole (insert) diameter +// hs - hole side, see values above for details +module hole_holder_hot_inserts(h, hd = 4, hs) +{ + d = hd + padding_around_insert * 2; + + rotate(hs) + difference() + { + hole_holder(h = 40, hd = 4); + + // holes for hot inserts + union() + { + translate([-h / 2 - $tiny_padding, 0, d / 2]) + screw_hole( + m = m2, + id = hd, + il = hole_insert_height, + hd = m2_head_diameter, + hh = m2_head_height, + hs = hole_side_left); + + translate([h / 2 + $tiny_padding, 0, d / 2]) + screw_hole( + m = m2, + id = hd, + il = hole_insert_height, + hd = m2_head_diameter, + hh = m2_head_height, + hs = hole_side_right); + } + } +} + +hole_holder_hot_inserts(h = 40, hd = 4, hs = hole_side_top); + *screw_hole( m = m2, id = 4, il = hole_insert_height * 2, hd = m2_head_diameter, hh = m2_head_height, - hs = hole_side_front); + hs = hole_side_bottom); //front_glass_hole(gw = 26.6, gh = 19.6, gt = 2, gcr = 1); |
