include <commitid.scad>
-module Gland(){
- hull(){
- for (m=[0,1]) {
- mirror([0,0, m]) {
- translate([0,0, 1.5 + (25-13)/2]) cylinder(r=13 /2 , h=0.5);
- translate([0,0, 1.5]) cylinder(r=25 / 2, h=0.5);
- }
- }
- }
+cable_dias = [6.5, 8.2];
+
+cd = cable_dias[1] + 0.5;
+wall = 2.5;
+
+function Gland_xlen(cabledia) = cabledia * 1.5;
+function Gland_xdia(cabledia) = cabledia * 2.0;
+function Gland_xoutdia(cabledia) = Gland_xdia(cabledia) * 1.1 + 0.5;
+
+// origin is centre, on outside
+// outside is in direction of positive X axies
+module GlandNegative(cabledia){
+ xlen = Gland_xlen(cabledia);
+ xdia = Gland_xdia(cabledia);
+
+ hull(){
+ rotate([0,90,0]) cylinder(r= cabledia/2, h=1);
+ translate([xdia,0,0]) rotate([0,90,0]) cylinder(r= xdia/2, h=1);
+ }
+ translate([-10,0,0])
+ rotate([0,90,0])
+ cylinder(r= cabledia/2, h=11);
}
+module GlandPositive(cabledia){
+ translate([-0.1, 0,0])
+ rotate([0,90,0])
+ cylinder(r= Gland_xoutdia(cabledia)/2, h= Gland_xlen(cabledia) + 0.1);
+}
+
+platesz = [wall, 24, 28];
+plateoff = [-platesz[0]/2, -platesz[1]/2, -platesz[2] + platesz[1]/2];
+
module Plate(){
difference(){
union(){
- Gland();
- translate([-20,-20,-1.5])
- cube([40,40,3]);
+ GlandPositive(cd);
+ translate(plateoff)
+ cube(platesz);
}
- translate([0,0,-50])
- cylinder(r=12.5 / 2, h=100);
+ GlandNegative(cd);
}
}
-module Test(){
- rotate([90,0,0])
- translate([0, 20, 0])
- Plate();
- translate([-20,-20,0]){
+module Test(){ ////toplevel
+ Plate();
+ translate(plateoff){
difference(){
- cube([40,20,1.2]);
- Commitid_BestCount_M([40,20]);
+ cube([15, 20, 1.2]);
+ Commitid_BestCount_M([15, 20]);
}
}
}
-Test();
+//Test();