canon_ble #82

Merged
mattmcw merged 149 commits from canon_ble into main 2023-08-01 03:38:52 +00:00
2 changed files with 57 additions and 25 deletions
Showing only changes of commit 503a8ec92f - Show all commits

View File

@ -1,6 +1,12 @@
include <common/common.scad>;
LIBRARY=false;
module cmount_male(len = 4) {
BellowsBoard = 60;
MagnetPositionX = 40;
MagnetPositionY = 40;
module cmount_male (len = 4) {
inner_d = 23;
outer_d = 24.7;
f_inner_d = 25.4;
@ -8,49 +14,53 @@ module cmount_male(len = 4) {
translate ([0, 0, len / 2 ]) {
difference () {
union () {
cylinder(r = outer_d / 2, h = len, center = true);
cylinder(r = R(outer_d), h = len, center = true);
}
cylinder(r = inner_d / 2, h = len + 1, center = true);
cylinder(r = R(inner_d), h = len + 1, center = true);
}
difference () {
translate([0, 0, -(len / 2) - 1]) cylinder(r = f_outer_d / 2, h = 2, center = true);
translate([0, 0, -(len / 2) - 1]) cylinder(r1 = f_inner_d / 2, r2 = inner_d / 2, h = 3, center = true);
translate([0, 0, -(len / 2) - 1]) cylinder(r = R(f_outer_d), h = 2, center = true);
translate([0, 0, -(len / 2) - 1]) cylinder(r1 = R(f_inner_d), r2 = R(inner_d), h = 3, center = true);
}
}
}
module bellows_camera_board () {
module bellows_camera_board (magnets = false) {
H = 6;
INNER_D = 39;
InnerD = 39;
difference () {
cube([60, 60, H], center = true);
if (magnets) {
bellows_board_magnetic_body();
} else {
cube([BellowsBoard, BellowsBoard, H], center = true);
}
//center
cylinder(r = INNER_D / 2, h = H + 1, center = true, $fn = 360);
cylinder(r = R(InnerD), h = H + 1, center = true, $fn = 360);
//center bevels
translate([0, 0, 2.25]) cylinder(r1 = (INNER_D - 2) / 2, r2 = (INNER_D + 2) / 2, h = 1.5, center = true, $fn = 360);
translate([0, 0, -2.25]) cylinder(r1 = (INNER_D + 2) / 2, r2 = (INNER_D - 2) / 2, h = 1.5, center = true, $fn = 360);
translate([0, 0, 2.25]) cylinder(r1 = R(InnerD - 2), r2 = R(InnerD + 2), h = 1.5, center = true, $fn = 360);
translate([0, 0, -2.25]) cylinder(r1 = R(InnerD + 2), r2 = R(InnerD - 2), h = 1.5, center = true, $fn = 360);
//corners
for (i = [0 : 3]) {
rotate([0, 0, i * (360 / 4) + 45 ]) translate([43.5, 0, 0]) cube([11, 11, H + 1], center = true);
}
//bolt
translate([0, 30, 0]) rotate([90, 0, 0]) cylinder(r = (4 / 2), h = 30, center = true, $fn = 30);
translate([0, 30, 0]) rotate([90, 0, 0]) cylinder(r = R(4), h = 30, center = true, $fn = 30);
}
}
module bellows_camera_board () {
module bellows_lens_board () {
H = 6;
PROTRUSION_D = 37.25;
PROTRUSION_H = 7;
INNER_D = 34.5;
ProtrusionD = 37.25;
ProtrusionH = 7;
InnerD = 34.5;
difference () {
union () {
cube([60, 60, H], center = true);
translate([0, 0, (H/2) + (PROTRUSION_H/2)]) cylinder(r = PROTRUSION_D / 2, h = PROTRUSION_H, center = true, $fn = 360);
cube([BellowsBoard, BellowsBoard, H], center = true);
translate([0, 0, (H/2) + (ProtrusionH/2)]) cylinder(r = R(ProtrusionD), h = ProtrusionH, center = true, $fn = 360);
}
//center
cylinder(r = INNER_D / 2, h = H + PROTRUSION_H + 10, center = true, $fn = 360);
cylinder(r = R(InnerD), h = H + ProtrusionH + 10, center = true, $fn = 360);
//corners
for (i = [0 : 3]) {
@ -64,22 +74,44 @@ module camera_mount () {
cmount_male(5);
translate([0, 0, -4]) {
difference() {
cylinder(r = 42 / 2, h = 4, center = true);
cylinder(r = 26 / 2, h = 4 + 1, center = true);
cylinder(r = R(42), h = 4, center = true);
cylinder(r = R(26), h = 4 + 1, center = true);
}
}
translate([0, 0, -4 - 5]) {
difference() {
cylinder(r = 37.9 / 2, h = 7, center = true);
cylinder(r = 30 / 2, h = 7 + 1, center = true);
cylinder(r = R(37.9), h = 7, center = true);
cylinder(r = R(30), h = 7 + 1, center = true);
}
}
}
PART = "bellows_camera_board";
module magnet_void (pos = [0, 0, 0], H = 2.6) {
D = 6 + .25;
translate(pos) cylinder(r = R(D), h = H, center = true, $fn = 60);
}
module bellows_board_magnetic_body (H = 6) {
X = MagnetPositionX / 2;
Y = MagnetPositionY / 2;
Z = .5;
difference () {
cube([BellowsBoard, BellowsBoard, H], center = true);
magnet_void([X, Y, Z], H);
magnet_void([-X, Y, Z], H);
magnet_void([X, -Y, Z], H);
magnet_void([-X, -Y, Z], H);
}
}
PART = "bellows_camera_board_magnetic";
if (!LIBRARY && PART == "bellows_camera_board") {
bellows_camera_board();
} else if (!LIBRARY && PART == "bellows_camera_board_magnetic") {
bellows_camera_board(magnets = true);
} else if (!LIBRARY && PART == "camera_mount") {
camera_mount();
} else if (!LIBRARY && PART == "bellows_lens_board") {

@ -1 +1 @@
Subproject commit cba7a3051ef0729eaa1d5c5da6205464185734e0
Subproject commit 87a68d07fa3a29f923187073193def5bf0805c94