Compare commits
2 Commits
39676f9a06
...
33412b0588
Author | SHA1 | Date |
---|---|---|
Matt McWilliams | 33412b0588 | |
Matt McWilliams | 3c5e31a961 |
|
@ -11,7 +11,9 @@ FN = 120;
|
||||||
PlugD = 16.15 - 0.6;
|
PlugD = 16.15 - 0.6;
|
||||||
PlugH = 11.65;
|
PlugH = 11.65;
|
||||||
PlugGuideD = 17 - 0.6;
|
PlugGuideD = 17 - 0.6;
|
||||||
PlugPinD = 3.1;
|
PlugPinD1 = 1.9;
|
||||||
|
PlugPinD2 = 2.9;
|
||||||
|
PlugPinD3 = 3.9;
|
||||||
|
|
||||||
PlugGuideRetraction = 1.25;
|
PlugGuideRetraction = 1.25;
|
||||||
|
|
||||||
|
@ -19,31 +21,44 @@ PinSpacing = 3.85;
|
||||||
|
|
||||||
SocketD = 16.15;
|
SocketD = 16.15;
|
||||||
SocketGuideD = 17.5;
|
SocketGuideD = 17.5;
|
||||||
|
|
||||||
SocketOuterD = 20;
|
SocketOuterD = 20;
|
||||||
SocketH = 10.5;
|
SocketH = 10.5;
|
||||||
|
SocketPinD = 3.1;
|
||||||
|
|
||||||
CollarD = 22;
|
CollarD = 22;
|
||||||
|
|
||||||
GuideAngles = [0, 100, 140, 215, 260];
|
GuideAngles = [0, 100, 140, 215, 260];
|
||||||
GuideWidths = [3.2, 1.5, 1.5, 1.5, 1.5];
|
GuideWidths = [3.2, 1.5, 1.5, 1.5, 1.5];
|
||||||
|
|
||||||
|
DEBUG = false;
|
||||||
|
|
||||||
function arc_angle (D, W) = W / ((PI/180) * (D/2));
|
function arc_angle (D, W) = W / ((PI/180) * (D/2));
|
||||||
|
|
||||||
module guide (Diameter, Height, Angle, Width) {
|
module guide (Diameter, Height, Angle, Width) {
|
||||||
A = arc_angle(Diameter, Width);
|
A = arc_angle(Diameter, Width);
|
||||||
echo(A);
|
echo(A);
|
||||||
|
if (!DEBUG) {
|
||||||
rotate([0, 0, Angle]) difference () {
|
rotate([0, 0, Angle]) difference () {
|
||||||
cylinder(r = R(Diameter), h = Height, center = true, $fn = FN);
|
cylinder(r = R(Diameter), h = Height, center = true, $fn = FN);
|
||||||
rotate([0, 0, -A/2]) translate([Diameter / 2, 0, 0]) cube([Diameter, Diameter * 2, Height + 1], center = true);
|
rotate([0, 0, -A/2]) translate([Diameter / 2, 0, 0]) cube([Diameter, Diameter * 2, Height + 1], center = true);
|
||||||
rotate([0, 0, A/2]) translate([-Diameter / 2, 0, 0]) cube([Diameter, Diameter * 2, Height + 1], center = true);
|
rotate([0, 0, A/2]) translate([-Diameter / 2, 0, 0]) cube([Diameter, Diameter * 2, Height + 1], center = true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
module plug_pin (X, Y, H) {
|
module plug_pin (X = 0, Y = 0, H = 10) {
|
||||||
|
translate([X, Y, 0]) rotate([180, 0, 0]) {
|
||||||
|
cylinder(r = R(PlugPinD3), h = H, center = true, $fn = 40);
|
||||||
|
translate([0, 0, -(H / 2) - (3.1 / 2)]) cylinder(r = R(PlugPinD2), h = 3.11, center = true, $fn = 40);
|
||||||
|
translate([0, 0, -(H / 2) - 3.1 - (0.7 / 2)]) cylinder(r1 = R(PlugPinD1), r2 = R(PlugPinD2), h = 0.72, center = true, $fn = 40);
|
||||||
|
translate([0, 0, -(H / 2) - 3.1 - 0.7 - (8 / 2)]) cylinder(r = R(PlugPinD1), h = 8.01, center = true, $fn = 40);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
module socket_pin (X = 0, Y = 0, H = 10) {
|
||||||
translate([X, Y, 0]) {
|
translate([X, Y, 0]) {
|
||||||
cylinder(r = R(PlugPinD), h = H, center = true, $fn = 40);
|
cylinder(r = R(SocketPinD), h = H, center = true, $fn = 40);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -66,33 +81,60 @@ module plug_pin_voids (PinH) {
|
||||||
plug_pin(PinSpacing, -PinSpacing, PinH); //7
|
plug_pin(PinSpacing, -PinSpacing, PinH); //7
|
||||||
}
|
}
|
||||||
|
|
||||||
|
module socket_pin_voids (PinH) {
|
||||||
|
socket_pin(0, 0, PinH); //5
|
||||||
|
socket_pin(PinSpacing, 0, PinH); //4
|
||||||
|
socket_pin(-PinSpacing, 0, PinH); //6
|
||||||
|
socket_pin(0, PinSpacing, PinH); //2
|
||||||
|
socket_pin(0, -PinSpacing, PinH); //8
|
||||||
|
socket_pin(PinSpacing, PinSpacing, PinH); //1
|
||||||
|
socket_pin(-PinSpacing, PinSpacing, PinH); //3
|
||||||
|
socket_pin(-PinSpacing, -PinSpacing, PinH); //9
|
||||||
|
socket_pin(PinSpacing, -PinSpacing, PinH); //7
|
||||||
|
}
|
||||||
|
|
||||||
module cpc_9pin_plug () {
|
module cpc_9pin_plug () {
|
||||||
$fn = FN;
|
$fn = FN;
|
||||||
PinH = PlugH + 1;
|
PinH = PlugH + 1;
|
||||||
difference () {
|
difference () {
|
||||||
union () {
|
union () {
|
||||||
cylinder(r = R(PlugD), h = PlugH, center = true);
|
cylinder(r = R(PlugD), h = PlugH, center = true);
|
||||||
translate([0, 0, -(PlugH/2)+(2/2)]) cylinder(r = R(PlugD + 2), h = 2, center = true);
|
//translate([0, 0, -(PlugH/2)+(2/2)]) cylinder(r = R(PlugD + 2), h = 2, center = true);
|
||||||
translate([0, 0, -PlugGuideRetraction/2]) {
|
translate([0, 0, -PlugGuideRetraction/2]) {
|
||||||
for (i = [0 : len(GuideAngles) - 1]) {
|
for (i = [0 : len(GuideAngles) - 1]) {
|
||||||
guide(PlugGuideD, PlugH - PlugGuideRetraction, GuideAngles[i], GuideWidths[i]);
|
guide(PlugGuideD, PlugH - PlugGuideRetraction, GuideAngles[i], GuideWidths[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
plug_pin_voids(PinH);
|
translate([0, 0, -7]) cylinder(r = R(PlugD) - 0.5, h = PlugH, center = true);
|
||||||
|
translate([0, 0, -5]) plug_pin_voids(PinH);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
module cpc_9pin_plug_insert () {
|
||||||
|
$fn = FN;
|
||||||
|
BaseH = 3;
|
||||||
|
translate([0, 0, -5.75]) difference () {
|
||||||
|
union () {
|
||||||
|
cylinder(r = R(PlugD - 1.2), h = 6, center = true);
|
||||||
|
translate([0, 0, -1]) cylinder(r = R(PlugD + 2.5), h = 2, center = true);
|
||||||
|
color("green") translate([0, 0, -7]) cylinder(r = R(PlugD + 1.2), h = 10, center = true);
|
||||||
|
}
|
||||||
|
cylinder(r = R(PlugD - 2.2), h = 30, center = true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
module cpc_9pin_plug_collar () {
|
module cpc_9pin_plug_collar () {
|
||||||
$fn = FN;
|
$fn = FN;
|
||||||
H = 25;
|
H = 10;
|
||||||
|
|
||||||
difference () {
|
difference () {
|
||||||
union () {
|
union () {
|
||||||
cylinder(r = R(CollarD), h = H, center = true);
|
cylinder(r = R(23), h = H, center = true);
|
||||||
}
|
}
|
||||||
cylinder(r = R(SocketD), h = H, center = true);
|
cylinder(r = R(17), h = H + 1, center = true);
|
||||||
|
cylinder(r = R(21), h = H - 4, center = true);
|
||||||
|
translate([0, 0, H / 2]) cylinder(r = R(19), h = H, center = true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -103,6 +145,7 @@ module cpc_9pin_plug_back () {
|
||||||
module flange_guide_void (pos = [0, 0, 0], Z = 8) {
|
module flange_guide_void (pos = [0, 0, 0], Z = 8) {
|
||||||
OD = 24;
|
OD = 24;
|
||||||
ID = 19;
|
ID = 19;
|
||||||
|
if (!DEBUG) {
|
||||||
translate(pos) {
|
translate(pos) {
|
||||||
intersection () {
|
intersection () {
|
||||||
difference () {
|
difference () {
|
||||||
|
@ -117,6 +160,7 @@ module flange_guide_void (pos = [0, 0, 0], Z = 8) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
module cpc_9pin_socket () {
|
module cpc_9pin_socket () {
|
||||||
$fn = FN;
|
$fn = FN;
|
||||||
|
@ -141,7 +185,7 @@ module cpc_9pin_socket () {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
plug_pin_voids(PinH);
|
socket_pin_voids(PinH);
|
||||||
translate([0, 0, 3]) rotate([0,0, 37]) flange_guide_void([0, 0, (PlugH / 2) - (8 / 2) + 0.01], 8);
|
translate([0, 0, 3]) rotate([0,0, 37]) flange_guide_void([0, 0, (PlugH / 2) - (8 / 2) + 0.01], 8);
|
||||||
translate([0, 0, -((SocketH + BaseH) / 2) + (BaseH / 2)]) {
|
translate([0, 0, -((SocketH + BaseH) / 2) + (BaseH / 2)]) {
|
||||||
m3_bolt_void([BoltVoid/2, BoltVoid/2, 0], BaseH + 1);
|
m3_bolt_void([BoltVoid/2, BoltVoid/2, 0], BaseH + 1);
|
||||||
|
@ -150,14 +194,15 @@ module cpc_9pin_socket () {
|
||||||
m3_bolt_void([-BoltVoid/2, -BoltVoid/2, 0], BaseH + 1);
|
m3_bolt_void([-BoltVoid/2, -BoltVoid/2, 0], BaseH + 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
module debug () {
|
module debug () {
|
||||||
|
//cpc_9pin_plug();
|
||||||
difference () {
|
difference () {
|
||||||
union () {
|
union () {
|
||||||
cpc_9pin_plug();
|
color("green") translate([0, 0, 2.1]) rotate([180, 0, 0]) cpc_9pin_socket();
|
||||||
translate([0, 0, 13]) cpc_9pin_socket();
|
cpc_9pin_plug_insert();
|
||||||
|
translate([0, 0, -5]) cpc_9pin_plug_collar();
|
||||||
}
|
}
|
||||||
translate([25, 0, 0]) cube([50, 50, 100], center = true);
|
translate([25, 0, 0]) cube([50, 50, 100], center = true);
|
||||||
}
|
}
|
||||||
|
@ -165,6 +210,8 @@ module debug () {
|
||||||
|
|
||||||
if (PART == "9pin_plug") {
|
if (PART == "9pin_plug") {
|
||||||
cpc_9pin_plug();
|
cpc_9pin_plug();
|
||||||
|
} else if (PART == "9pin_plug_insert") {
|
||||||
|
cpc_9pin_plug_insert();
|
||||||
} else if (PART == "9pin_plug_collar") {
|
} else if (PART == "9pin_plug_collar") {
|
||||||
cpc_9pin_plug_collar();
|
cpc_9pin_plug_collar();
|
||||||
} else if (PART == "9pin_socket") {
|
} else if (PART == "9pin_socket") {
|
||||||
|
|
Loading…
Reference in New Issue