summaryrefslogtreecommitdiff
path: root/body
diff options
context:
space:
mode:
Diffstat (limited to 'body')
-rw-r--r--body/body.scad2
-rw-r--r--body/holes.scad83
-rw-r--r--body/veye_imx287.scad4
3 files changed, 69 insertions, 20 deletions
diff --git a/body/body.scad b/body/body.scad
index dbf6b8d..982745a 100644
--- a/body/body.scad
+++ b/body/body.scad
@@ -26,7 +26,7 @@ module cam_and_lense()
rotate([$sensorLenseAngleDegrees, 0, 0])
{
color("yellow", 0.3)
- *veye_imx287_natural();
+ veye_imx287_natural();
}
color("green", 0.5)
diff --git a/body/holes.scad b/body/holes.scad
index 0512fda..ce61604 100644
--- a/body/holes.scad
+++ b/body/holes.scad
@@ -7,23 +7,17 @@ include <helpers.scad>
// Z facing towards laser beam
// X facing right on laser beam plane
// Y facing top (for scanner body)
-hole_side_front = 0;
-hole_side_back = 1;
-hole_side_top = 2;
-hole_side_bottom = 3;
-hole_side_left = 4;
-hole_side_right = 5;
+hole_side_front = [90, 0, 0];
+hole_side_back = [-90, 0, 0];
+hole_side_top = [180, 0, 0];
+hole_side_bottom = [0, 0, 0];
+hole_side_left = [0, 90, 0];
+hole_side_right = [0, -90, 0];
-// some draft here, don't pay attention:
-// id - insert diameter
-// il - insert length (unused?)
-// m - screw deameter, like M2
-// r - glass corner radius
-// hole_side - see hole_side_* values above. affects hole
-// initial position. unused here, glass is always facing Z+
-// in scanner coords
-// TODO: cleanup unused params
-//module glass_hole(id, il, m, r, hole_side)
+hole_insert_height = 4;
+m2_head_diameter = 3.75;
+m2_head_height = 1.9;
+m2 = 2;
// gw - glass width
// gh - glass height
@@ -105,4 +99,59 @@ module front_glass_hole(gw, gh, gt, gcr)
glass_hole(gw, gh, gt, gcr);
}
-//front_glass_hole(gw = 26.6, gh = 19.6, gt = 2, gcr = 1); \ No newline at end of file
+// m - bolt deameter, like M2
+// id - insert diameter
+// il - insert length
+// hd - screw head diameter
+// hh - screw head height
+// hs - hole side, see values above for details
+// wt - wall thickness
+// TODO: use `bolt` or `screw` everywhere
+module screw_hole(m, id, il, hd, hh, hs, wt = $scannerBodyWallThicknessMm)
+{
+ screw_diameter_delta = 0.2;
+ sdd = screw_diameter_delta;
+
+ head_diameter_delta = 1;
+ hdd = head_diameter_delta;
+
+ head_height_delta = 0.1;
+ hhd = head_height_delta;
+ subwall_thickness = 2;
+
+ rotate(hs)
+ {
+ // insert cutter
+ cylinder($fn = dToFn(id), d = id, h = il);
+
+ // screw cutter
+ rotate([180, 0, 0])
+ {
+ // full screw diameter
+ fsd = m + sdd;
+ translate([0, 0, -$tiny_padding])
+ %cylinder($fn = dToFn(fsd), d = fsd, h = wt + $tiny_padding * 2);
+
+ // screw head cutter
+ // full head diameter
+ fhd = hd + hdd;
+ fhh = hh + hhd;
+ echo("hh:", hh);
+ echo("fhh:", fhh);
+ translate([0, 0, wt - fhh])
+ cylinder($fn = dToFn(fhd), d = fhd, h = fhh);
+ }
+ }
+}
+
+*screw_hole(
+ m = m2,
+ id = 4,
+ il = hole_insert_height * 2,
+ hd = m2_head_diameter,
+ hh = m2_head_height,
+ hs = hole_side_front);
+
+//front_glass_hole(gw = 26.6, gh = 19.6, gt = 2, gcr = 1);
+
+//screw_hole(2); \ No newline at end of file
diff --git a/body/veye_imx287.scad b/body/veye_imx287.scad
index ed2c7da..85ebcf6 100644
--- a/body/veye_imx287.scad
+++ b/body/veye_imx287.scad
@@ -218,9 +218,9 @@ color("green", 0.4)
*veye_imx287_mount_plate();
color("red", 0.1)
-%veye_imx287_mount_plate_outer();
+*veye_imx287_mount_plate_outer();
color("green", 0.3)
-%veye_imx287_mount_plate_inner();
+*veye_imx287_mount_plate_inner();
*difference()
{