summaryrefslogtreecommitdiff
path: root/body/holes.scad
diff options
context:
space:
mode:
authorNikita Kostovsky <nikita@kostovsky.me>2026-01-31 15:44:57 +0100
committerNikita Kostovsky <nikita@kostovsky.me>2026-01-31 15:44:57 +0100
commit392ab1017c0491412d452013f2af02b7bf06cd1a (patch)
tree2f56078030f031f13faa59186a9a67e719963075 /body/holes.scad
parent1c6a2cbe7b799e6ccb387b45546c779dcf9d3a9b (diff)
prepared body with all holes except mounting holes
Diffstat (limited to 'body/holes.scad')
-rw-r--r--body/holes.scad27
1 files changed, 18 insertions, 9 deletions
diff --git a/body/holes.scad b/body/holes.scad
index a764dc7..5074ddc 100644
--- a/body/holes.scad
+++ b/body/holes.scad
@@ -1,5 +1,6 @@
include <design.scad>
include <helpers.scad>
+include <body_config.scad>
// `Heat` in module name means heat brass threaded insert
@@ -14,11 +15,15 @@ hole_side_bottom = [0, 0, 0];
hole_side_left = [0, 90, 0];
hole_side_right = [0, -90, 0];
-hole_insert_height = 4;
m2_head_diameter = 3.75;
m2_head_height = 1.9;
m2 = 2;
+// some default values
+// TODO: propagate everywhere
+hole_insert_height = 4;
+hole_insert_diameter = 4;
+
padding_around_insert = 2;
// gw - glass width
@@ -138,21 +143,19 @@ module screw_hole(m, id, il, hd, hh, hs, wt = $scannerBodyWallThicknessMm)
// full head diameter
fhd = hd + hdd;
fhh = hh + hhd;
- echo("hh:", hh);
- echo("fhh:", fhh);
translate([0, 0, wt - fhh - $tiny_padding])
cylinder($fn = dToFn(fhd), d = fhd, h = fhh + $tiny_padding * 2);
}
}
}
-function padded_hole_d(hd = 4) =
+function padded_hole_d(hd = hole_insert_diameter) =
hd + padding_around_insert * 2;
// h - height
// hd - hole diameter
// TODO: support usual holes, not only hot inserts
-module hole_holder(h, hd = 4)
+module hole_holder(h, hd = hole_insert_diameter)
{
d = padded_hole_d(hd);
cube_size = [d * 2, d / 2, h];
@@ -182,14 +185,17 @@ module hole_holder(h, hd = 4)
// h - height
// hd - hole (insert) diameter
// hs - hole side, see values above for details
-module hole_holder_hot_inserts(h, hd = 4, hs)
+module hole_holder_hot_inserts(
+ h = main_frame_width_x,
+ hd = hole_insert_diameter,
+ hs)
{
d = hd + padding_around_insert * 2;
rotate(hs)
difference()
{
- hole_holder(h = 40, hd = 4);
+ hole_holder(h = h, hd = hd);
// holes for hot inserts
union()
@@ -215,11 +221,14 @@ module hole_holder_hot_inserts(h, hd = 4, hs)
}
}
-hole_holder_hot_inserts(h = 40, hd = 4, hs = hole_side_top);
+*hole_holder_hot_inserts(
+ h = main_frame_width_x,
+ hd = hole_insert_diameter,
+ hs = hole_side_top);
*screw_hole(
m = m2,
- id = 4,
+ id = hole_insert_diameter,
il = hole_insert_height * 2,
hd = m2_head_diameter,
hh = m2_head_height,