summaryrefslogtreecommitdiff
path: root/body/veye_imx287.scad
diff options
context:
space:
mode:
authorNikita Kostovsky <nikita@kostovsky.me>2026-01-08 22:32:58 +0100
committerNikita Kostovsky <nikita@kostovsky.me>2026-01-08 22:32:58 +0100
commit6bc0a3523b4711437b96aeebba44c4e9931e134d (patch)
tree62600cbe29c760fcb0f13346221bacc4bb91634e /body/veye_imx287.scad
parent64374d0ce953904a0ab3ddbcd54aca6dcba9cbda (diff)
add missing files; add draft camera_lense holder
Diffstat (limited to 'body/veye_imx287.scad')
-rw-r--r--body/veye_imx287.scad151
1 files changed, 105 insertions, 46 deletions
diff --git a/body/veye_imx287.scad b/body/veye_imx287.scad
index 5594c20..ed2c7da 100644
--- a/body/veye_imx287.scad
+++ b/body/veye_imx287.scad
@@ -6,6 +6,16 @@ veye_imx287_pcb_h = 29;
veye_imx287_pcb_thickness = 1.6;
veye_imx287_pcb_stack_h = 11;
imx287_thickness = 1.3;
+veye_imx287_mount_plate_corner_radius = 2;
+veye_imx287_mount_plate_thickness = 2;
+veye_imx287_mount_plate_frame_w = 6;
+
+function veye_imx287_mount_plate_offset() =
+ // sensor has non-zero thickness, so put holder
+ // closer to pcb (but avoid artifacts)
+ [0, -imx287_thickness + $tiny_padding, 0] +
+ // move to zero
+ [0, veye_imx287_mount_plate_thickness / 2, 0];
module veye_imx287_wo_holes()
{
@@ -101,16 +111,88 @@ module veye_imx287_natural()
}
}
+module veye_imx287_mount_plate_outer()
+{
+ w = veye_imx287_pcb_w;
+ h = veye_imx287_pcb_h;
+ t = veye_imx287_mount_plate_thickness;
+ cr = veye_imx287_mount_plate_corner_radius;
+
+ translate(veye_imx287_mount_plate_offset())
+ hull()
+ {
+ for (
+ dx = [w / 2 - cr, -w / 2 + cr],
+ dy = [h / 2 - cr, -h / 2 + cr])
+ {
+ translate([dx, 0, dy])
+ translate([0, t / 2, 0])
+ rotate([90, 0, 0])
+ cylinder($fn = dToFn(cr * 2), r = cr, h = t);
+ }
+ }
+}
+
+// inner area to cut
+module veye_imx287_mount_plate_inner()
+{
+ w = veye_imx287_pcb_w;
+ h = veye_imx287_pcb_h;
+ frame_w = veye_imx287_mount_plate_frame_w;
+ iw = w - frame_w;
+ ih = h - frame_w;
+ t = veye_imx287_mount_plate_thickness;
+ cr = veye_imx287_mount_plate_corner_radius;
+
+ translate(veye_imx287_mount_plate_offset())
+ hull()
+ {
+ for (
+ dx = [iw / 2 - cr, -iw / 2 + cr],
+ dy = [iw / 2 - cr, -iw / 2 + cr])
+ {
+ translate([dx, 0, dy])
+ translate([0, t / 2 + $tiny_padding, 0])
+ rotate([90, 0, 0])
+ cylinder(
+ $fn = dToFn(cr * 2),
+ r = cr,
+ h = t + $tiny_padding * 2);
+ }
+ }
+}
+
+// screw holes
+module veye_imx287_mount_plate_holes()
+{
+ // holes
+ hd = 2.05;
+ hh = 10;
+
+ // distance between holes
+ h_delta = 25;
+
+ translate(veye_imx287_mount_plate_offset())
+ for (
+ dx = [h_delta / 2, -h_delta / 2],
+ dy = [h_delta / 2, -h_delta / 2])
+ {
+ translate([dx, 0, dy])
+ translate([0, hh / 2, 0])
+ rotate([90, 0, 0])
+ cylinder($fn = dToFn(hd), d = hd, h = hh);
+ }
+}
+
module veye_imx287_mount_plate()
{
w = veye_imx287_pcb_w;
h = veye_imx287_pcb_h;
- frame_w = 6;
+ frame_w = veye_imx287_mount_plate_frame_w;
iw = w - frame_w;
ih = h - frame_w;
- t = 2;
- corner_radius = 2;
- cr = corner_radius;
+ t = veye_imx287_mount_plate_thickness;
+ cr = veye_imx287_mount_plate_corner_radius;
// holes
hd = 2.05;
@@ -119,55 +201,32 @@ module veye_imx287_mount_plate()
h_delta = 25;
hr = hd / 2;
- // sensor has non-zero thickness, so put holder
- // closer to pcb
- translate([0, -imx287_thickness, 0])
- // move to zero
- translate([0, t / 2, 0])
difference()
{
// outer shape
- hull()
- {
- for (
- dx = [w / 2 - cr, -w / 2 + cr],
- dy = [w / 2 - cr, -w / 2 + cr])
- {
- translate([dx, 0, dy])
- translate([0, t / 2, 0])
- rotate([90, 0, 0])
- cylinder($fn = dToFn(cr * 2), r = cr, h = t);
- }
- }
+ veye_imx287_mount_plate_outer();
// to cut
- hull()
- {
- for (
- dx = [iw / 2 - cr, -iw / 2 + cr],
- dy = [iw / 2 - cr, -iw / 2 + cr])
- {
- translate([dx, 0, dy])
- translate([0, t, 0])
- rotate([90, 0, 0])
- cylinder($fn = dToFn(cr * 2), r = cr, h = t * 2);
- }
- }
+ veye_imx287_mount_plate_inner();
// holes
- {
- for (
- dx = [h_delta / 2, -h_delta / 2],
- dy = [h_delta / 2, -h_delta / 2])
- {
- translate([dx, 0, dy])
- translate([0, hh / 2, 0])
- rotate([90, 0, 0])
- cylinder($fn = dToFn(hd), d = hd, h = hh);
- }
- }
+ veye_imx287_mount_plate_holes();
}
}
-color("yellow", 0.3)
+color("yellow", 0.1)
*veye_imx287_natural();
+color("green", 0.4)
+*veye_imx287_mount_plate();
+
+color("red", 0.1)
+%veye_imx287_mount_plate_outer();
color("green", 0.3)
-*veye_imx287_mount_plate(); \ No newline at end of file
+%veye_imx287_mount_plate_inner();
+
+*difference()
+{
+ //color("brown", 0.4)
+ veye_imx287_mount_plate_outer();
+ //color("blue", 0.4)
+ veye_imx287_mount_plate_inner();
+}
+