Compare commits

..

No commits in common. "c6b85924904746c425f368c2771c66e4282e28f3" and "a4bc54482dbdf272b4d9025aec78eb7d0ed18553" have entirely different histories.

2 changed files with 19 additions and 85 deletions

View File

@ -4,8 +4,6 @@ BaseZ = 10; //debug
BaseX = 91.4; BaseX = 91.4;
BaseY = 97.6; BaseY = 97.6;
function hypotenuese(X) = sqrt(pow(X, 2) + pow(X, 2));
module base_void (pos = [0, 0, 0]) { module base_void (pos = [0, 0, 0]) {
$fn = 50; $fn = 50;
D = 9.5; D = 9.5;
@ -33,9 +31,9 @@ module base (pos = [0, 0, 0]) {
} }
} }
module sensor (pos = [0, 0, 0], LENGTH = 1) { module sensor (pos = [0, 0, 0]) {
X = 22.3; X = 22.3;
Y = LENGTH; Y = 1;
Z = 14.9; Z = 14.9;
translate(pos) { translate(pos) {
cube([X, Y, Z], center = true); cube([X, Y, Z], center = true);
@ -59,7 +57,7 @@ module canon_rebel_t3i (pos = [0, 0, 0]) {
color("azure", 0.25) { color("azure", 0.25) {
cage_cube(X, Y, Z); cage_cube(X, Y, Z);
} }
color("green") sensor([0, 0, 0]); //160 color("green") sensor([0, 0, 0]);
} }
} }
@ -85,38 +83,8 @@ module canon_m_50 (pos = [0, 0, 0]) {
} }
} }
module canon_m_50_mount () { color("red") base();
X = 60; canon_rebel_t3i_mount([0, 20, 33]);
Y = 60; canon_rebel_t3i([0, 20+52.5, 66 + (99.5/2)]);
Z = 71.75;
SPACING = 40;
ACCESS = 15;
DIAG = hypotenuese(ACCESS);
translate([0, 0, Z/2]) {
difference () {
cube([X, Y, Z], center = true);
cube([X + 1, Y-40, Z-20], center = true);
cube([X + 1, Y-20, Z-40], center = true);
//void around camera bolt canon_m_50([0, 0, 120]);
translate([0, 0, (Z/2) - 20]) cylinder(r = R(30), h = 20, center = true, $fn = 100);
//void for camera bolt
translate([0, 0, (Z/2)]) cylinder(r = R(5), h = 20 + 1, center = true, $fn = 60);
//void for base bolts
//translate([0, SPACING/2, -(Z/2) + 10]) cylinder(r = R(9), h = 40, center = true, $fn = 60);
//translate([0, -SPACING/2, -(Z/2) + 10]) cylinder(r = R(9), h = 40, center = true, $fn = 60);
//bolt access
//translate([0, 0, -10]) rotate([0, 45, 0]) cube([ACCESS, Y + 1, ACCESS], center = true);
//translate([0, 0, -10 - (ACCESS/2) + (10/4)])cube([DIAG, Y + 1, 10], center = true);
}
}
}
//color("red") base();
//canon_rebel_t3i_mount([0, 20, 33]);
//canon_rebel_t3i([0, 20+52.5, 66 + (99.5/2)]);
//canon_m_50([0, 0, 115.75]);
canon_m_50_mount();

View File

@ -2,22 +2,20 @@ include <./arduino.scad>;
include <./common/common.scad>; include <./common/common.scad>;
DEBUG = false; DEBUG = false;
PART = "case_bottom"; PART = "case_bottomx";
CaseX = 40; CaseX = 40;
CaseY = 85; CaseY = 75;
CaseZ = 35; CaseZ = 30;
CaseD = 8; CaseD = 8;
CaseSplitZ = 30; CaseSplitZ = 25;
ESP32Position = [0, -7-5, -5]; ESP32Position = [0, -7, -5];
ESP32Size = [25.85, 53.8, 1.5]; ESP32Size = [25.85, 53.8, 1.5];
ButtonPosition = [9, CaseY/2, 0]; ButtonPosition = [0, CaseY/2, 3];
LEDPosition1 = [-3, CaseY/2, 0]; LEDPosition1 = [10, CaseY/2, 3];
LEDPosition2 = [-11, CaseY/2, 0]; LEDPosition2 = [-10, CaseY/2, 3];
BoltY = 25;
module pin_debug (pos = [0, 0, 0]) { module pin_debug (pos = [0, 0, 0]) {
translate(pos) cube([.6, .6, 6.26], center = true); translate(pos) cube([.6, .6, 6.26], center = true);
@ -52,11 +50,8 @@ module esp32_debug () {
module debug () { module debug () {
//translate(ESP32Position) rotate([180, 0, 0]) esp32_debug(); //translate(ESP32Position) rotate([180, 0, 0]) esp32_debug();
difference () { difference () {
union () {
case_bottom(); case_bottom();
translate([0, 0, 1]) rotate([0, 0, 0]) color("red") case_top(); //translate([CaseX / 2, 0, 0]) cube([CaseX, CaseY + 1, CaseZ + 1], center = true);
}
translate([-CaseX / 2, 0, 0]) cube([CaseX, CaseY + 1, 100], center = true);
} }
} }
@ -81,7 +76,7 @@ module esp32_mount (pos = [0, 0, 0]) {
Y = ESP32Size[1]; Y = ESP32Size[1];
Z = 2; Z = 2;
translate([pos[0], pos[1], pos[2]-5]) difference () { translate([pos[0], pos[1], pos[2]-5]) difference () {
cube([X+4, Y+4, 10], center = true); cube([X+3, Y+3, 10], center = true);
translate([0, 0, (10/2)-(2/2)+0.01]) cube([X, Y, Z], center = true); translate([0, 0, (10/2)-(2/2)+0.01]) cube([X, Y, Z], center = true);
translate([0, 0, 0]) cube([X-1, Y-1, 10], center = true); translate([0, 0, 0]) cube([X-1, Y-1, 10], center = true);
//micro usb //micro usb
@ -101,20 +96,10 @@ module LED_void (pos = [0, 0, 0]) {
translate(pos) rotate([90, 0, 0]) cylinder(r = R(D), h = 10, center = true, $fn = 60); translate(pos) rotate([90, 0, 0]) cylinder(r = R(D), h = 10, center = true, $fn = 60);
} }
module bolt_void (pos = [0, 0, 0], Z = 20, pad = 0) {
translate(pos) cylinder(r = R(3.25 + pad), h = Z, center = true, $fn = 30);
}
module bolt_plug (pos = [0, 0, 0], pad = 0) {
translate(pos) cylinder(r = R(8 + pad), h = 3.5, center = true, $fn = 60);
}
module case_bottom () { module case_bottom () {
difference () { difference () {
union () {
case_shell(); case_shell();
bolt_plug([0, BoltY, -(CaseZ/2)+4]);
}
translate([0, 0, CaseSplitZ]) cube([CaseX + 1, CaseY + 1, CaseZ],center = true); translate([0, 0, CaseSplitZ]) cube([CaseX + 1, CaseY + 1, CaseZ],center = true);
//micro usb //micro usb
translate([0, -(CaseY/2), -7.8]) cube([9, 7, 4], center = true); translate([0, -(CaseY/2), -7.8]) cube([9, 7, 4], center = true);
@ -124,35 +109,16 @@ module case_bottom () {
//LEDS //LEDS
LED_void(LEDPosition1); LED_void(LEDPosition1);
LED_void(LEDPosition2); LED_void(LEDPosition2);
//bolt
translate([0, BoltY, -(CaseZ/2)+(3.5/2)-0.01]) cylinder(r = R(5.6), h = 3.5, center = true, $fn = 30);
bolt_void([0, BoltY, -(CaseZ/2)], 20);
} }
esp32_mount(ESP32Position); esp32_mount(ESP32Position);
} }
module case_top () { module case_top () {
$fn = 50;
difference () { difference () {
case_shell(); case_shell();
translate([0, 0, CaseSplitZ-CaseZ]) cube([CaseX + 1, CaseY + 1, CaseZ],center = true); translate([0, 0, CaseSplitZ-CaseZ]) cube([CaseX + 1, CaseY + 1, CaseZ],center = true);
bolt_void([0, BoltY, 0], CaseZ - 6 + 1);
translate([2.5, -28, 17]) rotate([0, 0, 90]) scale([0.5, 0.5, 1]) linear_extrude(4) {
text("Canon EOS M50", font = "Liberation Sans:style=Bold Italic");
} }
}
translate([0, 0, 12]) difference () {
rounded_cube([CaseX - 6.1, CaseY - 6.1, 4], d = 6, center = true);
rounded_cube([CaseX - 8, CaseY - 8, 4 + 1], d = 5, center = true);
}
difference () {
translate([0, BoltY, 1]) cube([10, 10, CaseZ - 6 - 1], center = true);
bolt_void([0, BoltY, -4], CaseZ - 6 + 1, -.4);
bolt_plug([0, BoltY, -(CaseZ/2)+4], 0.2);
}
} }
if (PART == "case_bottom") { if (PART == "case_bottom") {