chiark / gitweb /
trackpump-mutlihead-clip: new hose side test
[reprap-play.git] / bike-lipo-box-gland.scad
1 // -*- C -*-
2
3 include <commitid.scad>
4
5 cable_dias = [6.5, 8.2];
6
7 cd = cable_dias[1] + 0.5;
8 wall = 2.5;
9
10 function Gland_xlen(cabledia)    = cabledia * 1.5;
11 function Gland_xdia(cabledia)    = cabledia * 2.0;
12 function Gland_xoutdia(cabledia) = Gland_xdia(cabledia) * 1.1 + 0.5;
13
14 // origin is centre, on outside
15 // outside is in direction of positive X axies
16 module GlandNegative(cabledia){
17   xlen = Gland_xlen(cabledia);
18   xdia = Gland_xdia(cabledia);
19
20   hull(){
21     rotate([0,90,0]) cylinder(r= cabledia/2, h=1);
22     translate([xdia,0,0]) rotate([0,90,0]) cylinder(r= xdia/2, h=1);
23   }
24   translate([-10,0,0])
25     rotate([0,90,0])
26     cylinder(r= cabledia/2, h=11);
27 }
28
29 module GlandPositive(cabledia){
30   translate([-0.1, 0,0])
31     rotate([0,90,0])
32     cylinder(r= Gland_xoutdia(cabledia)/2, h= Gland_xlen(cabledia) + 0.1);
33 }  
34
35 platesz = [wall, 24, 28];
36 plateoff = [-platesz[0]/2, -platesz[1]/2, -platesz[2] + platesz[1]/2];
37
38 module Plate(){
39   difference(){
40     union(){
41       GlandPositive(cd);
42       translate(plateoff)
43         cube(platesz);
44     }
45     GlandNegative(cd);
46   }
47 }
48
49 module Test(){ ////toplevel
50   Plate();
51   translate(plateoff){
52     difference(){
53       cube([15, 20, 1.2]);
54       Commitid_BestCount_M([15, 20]);
55     }
56   }
57 }
58
59 //Test();