From 2047ce4f764ca155af230e9c75b60360927c3123 Mon Sep 17 00:00:00 2001 From: mattmcw Date: Sun, 5 Mar 2023 00:28:39 -0500 Subject: [PATCH] cpc connector work --- scad/cpc_connectors.scad | 73 ++++++++++++++++++++++++++++++++++ scad/projector_controller.scad | 65 ++++++++++++++++++++++++++---- 2 files changed, 131 insertions(+), 7 deletions(-) create mode 100644 scad/cpc_connectors.scad diff --git a/scad/cpc_connectors.scad b/scad/cpc_connectors.scad new file mode 100644 index 0000000..4540e3f --- /dev/null +++ b/scad/cpc_connectors.scad @@ -0,0 +1,73 @@ +/* + Amphenol CPC 9pin Connectors +*/ + +include <./common/common.scad>; + +PART=""; + +PlugD = 11; +SocketD = PlugD + 0.2; + +module cpc_9pin_plug () { + $fn = 200; + D = 17; + OD = 28; + H = 25; + + difference () { + union () { + cylinder(r = OD / 2, h = H, center = true); + //cube([12, 48, 3], center = true); + } + //main void + translate([0, 0, -3]) cylinder(r = (OD / 2) - 3, h = H, center = true); + //connector void + cylinder(r = D / 2, h = H * 2, center = true); + } +} + +module cpc_9pin_plug_sleeve () { + $fn = 200; + D = 17; + OD = 28; + H = 25; + + difference () { + union () { + cylinder(r = OD / 2, h = H, center = true); + //cube([12, 48, 3], center = true); + } + //main void + translate([0, 0, -3]) cylinder(r = (OD / 2) - 3, h = H, center = true); + //connector void + cylinder(r = D / 2, h = H * 2, center = true); + } +} + +module cpc_9pin_socket () { + $fn = 200; + D = 17; + OD = 28; + H = 25; + + difference () { + union () { + cylinder(r = OD / 2, h = H, center = true); + //cube([12, 48, 3], center = true); + } + //main void + translate([0, 0, -3]) cylinder(r = (OD / 2) - 3, h = H, center = true); + //connector void + cylinder(r = D / 2, h = H * 2, center = true); + } + +} + +if (PART == "cpc_9pin_plug") { + cpc_9pin_plug(); +} else if (PART == "cpc_9pin_plug_sleeve") { + cpc_9pin_plug_sleeve(); +} else if (PART == "cpc_9pin_socket") { + cpc_9pin_socket(); +} \ No newline at end of file diff --git a/scad/projector_controller.scad b/scad/projector_controller.scad index 4d1a38f..21b5e9c 100644 --- a/scad/projector_controller.scad +++ b/scad/projector_controller.scad @@ -1,22 +1,73 @@ include ; +include ; -PART="electronics_mount"; +PART="electronics_mountx"; -CaseX = 100; -CaseY = 200; -CaseZ = 40; +CaseX = 121; +CaseY = 172; +CaseZ = 56; + +CaseInnerX = 112; +CaseInnerY = 162; +CaseInnerZ = 52; CaseMountsX = 90; -CaseMountsY = 190; +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 () { + Z = -CaseInnerZ/2+(CaseMountsH/2); + translate([CaseMountsX/2, CaseMountsY/2, Z]) case_mount_debug(); + translate([CaseMountsX/2, -CaseMountsY/2, Z]) case_mount_debug(); + translate([-CaseMountsX/2, CaseMountsY/2, Z]) case_mount_debug(); + translate([-CaseMountsX/2, -CaseMountsY/2, Z]) case_mount_debug(); +} module case_debug () { - cube([CaseX, CaseY, CaseZ], center = true); + 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 () { - bumper(); + 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(); +} else { + debug(); } \ No newline at end of file