mcopy/scad/projector_controller.scad

75 lines
1.4 KiB
OpenSCAD
Raw Normal View History

include <arduino.scad>;
2023-03-05 05:28:39 +00:00
include <common/common.scad>;
2023-03-05 05:28:39 +00:00
PART="electronics_mountx";
2023-03-05 05:28:39 +00:00
CaseX = 121;
CaseY = 172;
CaseZ = 56;
CaseInnerX = 112;
CaseInnerY = 162;
CaseInnerZ = 52;
CaseMountsX = 90;
2023-03-05 05:28:39 +00:00
CaseMountsY = 130;
CaseMountsH = 5;
CaseSplitZ = 41;
module case_mount_debug () {
$fn = 30;
translate([0, 0, -0.1]) difference () {
cylinder(r = R(7), h = CaseMountsH, center = true);
cylinder(r = R(3.25), h = CaseMountsH + 1, center = true);
}
}
module case_mounts_debug () {
2023-03-05 22:14:01 +00:00
X = CaseMountsX/2;
Y = CaseMountsY/2;
Z = -(CaseInnerZ/2)+(CaseMountsH/2);
translate([X, Y, Z]) case_mount_debug();
translate([X, -Y, Z]) case_mount_debug();
translate([-X, Y, Z]) case_mount_debug();
translate([-X, -Y, Z]) case_mount_debug();
2023-03-05 05:28:39 +00:00
}
module case_debug () {
2023-03-05 05:28:39 +00:00
difference () {
cube([CaseX, CaseY, CaseZ], center = true);
cube([CaseInnerX, CaseInnerY, CaseInnerZ], center = true);
translate([0, 0, CaseSplitZ]) cube([CaseX + 1, CaseY + 1, CaseZ], center = true);
translate([0, 150, 0]) cube([CaseX + 1, CaseY, CaseZ + 1], center = true);
}
case_mounts_debug();
}
module relay_module_debug () {
}
module capacitor_debug () {
}
module resistor_debug () {
}
module electronics_mount () {
2023-03-05 05:28:39 +00:00
translate([40, 78, 0]) rotate([0, 0, 180]) bumper();
}
module debug () {
case_debug();
translate([0, 0, -CaseInnerZ/2+(CaseMountsH)]) electronics_mount();
}
if (PART == "electronics_mount") {
electronics_mount();
2023-03-05 05:28:39 +00:00
} else {
debug();
}