summaryrefslogtreecommitdiff
path: root/body/body.scad
diff options
context:
space:
mode:
Diffstat (limited to 'body/body.scad')
-rw-r--r--body/body.scad84
1 files changed, 59 insertions, 25 deletions
diff --git a/body/body.scad b/body/body.scad
index 16459ba..0edfb3f 100644
--- a/body/body.scad
+++ b/body/body.scad
@@ -1,5 +1,6 @@
include <design.scad>
include <helpers.scad>
+include <holes.scad>
include <m12_connectors.scad>
include <m12_lense_holder.scad>
include <m12_lense_holder_adapter.scad>
@@ -7,6 +8,9 @@ include <noctua_nf_a4x20.scad>
include <radxa_zero_3e.scad>
include <veye_imx287.scad>
+// wall and wall thickness
+$wawt = -$scannerBodyFrontWallOffsetMm + $scannerBodyWallThicknessMm;
+
module cam_and_lense()
{
translate([0, 0, $lenseYPosMm])
@@ -21,7 +25,61 @@ module cam_and_lense()
}
}
+module camera_hole()
+{
+ // TODO: calc Y (scanner coords) offset instead of
+ // hardcoding it
+ y_offset = 100;
+ translate([0, 0, y_offset])
+ // move to the front border of scanner body
+ translate([0, $wawt, 0])
+ front_glass_hole(gw = 26.6, gh = 19.6, gt = 2, gcr = 1);
+}
+
+module laser_hole()
+{
+ // TODO: calc Y (scanner coords) offset instead of
+ // hardcoding it
+ y_offset = 0;
+ translate([0, 0, y_offset])
+ // move to the front border of scanner body
+ translate([0, $wawt, 0])
+ front_glass_hole(gw = 14, gh = 6, gt = 2, gcr = 1);
+}
+
+module visualize_yz_range()
+{
+ lenseY = $lenseYPosMm;
+ zBase = $actualZBaseMm + $wawt;
+ farZ = zBase + $actualZRangeMm;
+
+ color("red", 0.3)
+ rotate([0, -90, 0])
+ %polygon([
+ [lenseY, 0],
+ [0, zBase],
+ [0, farZ],
+ ]);
+}
+
+module visualize_xz_range()
+{
+ zBase = $actualZBaseMm + $wawt;
+ farZ = zBase + $actualZRangeMm;
+
+ color("red", 0.3)
+ %polygon(
+ [[$actualXStartMm / 2, zBase],
+ [-$actualXStartMm / 2, zBase],
+ [-$actualXEndMm / 2, farZ],
+ [$actualXEndMm / 2, farZ],]);
+}
+
cam_and_lense();
+camera_hole();
+laser_hole();
+visualize_yz_range();
+visualize_xz_range();
// laser
translate([0, -$laserZOffsetMm, 0])
@@ -58,7 +116,7 @@ module scanner_main_frame()
// many similar ranges
main_frame_height_y = 150;
main_frame_width_x = 34;
- main_frame_depth_z = 65;
+ main_frame_depth_z = 56;
// inner height, width, depth and radius
ih = main_frame_height_y;
@@ -66,30 +124,6 @@ module scanner_main_frame()
id = main_frame_depth_z;
ir = wt;
- // front wall
- translate([-iw / 2, -wzo, -lhs[2] / 2])
- cube([iw, wt, ih]);
-
- // back wall
- translate([0, -wzo - id, 0])
- // initial positioning
- translate([-iw / 2, -wt, -lhs[2] / 2])
- cube([iw, wt, ih]);
-
- // bottom wall
- // apply body sizes
- translate([0, -wzo, -lhs[2] / 2])
- // initial positioning
- translate([0, -id / 2, -wt / 2])
- cube([iw, id, wt], center = true);
-
- // top wall
- // apply body sizes
- translate([0, -wzo, -lhs[2] / 2 + ih])
- // initial positioning
- translate([0, -id / 2, wt / 2])
- cube([iw, id, wt], center = true);
-
// now try to cut body with rounded corners to simplify
// cnc manufacturing
// TODO: move this shit to a module