3 include <commitid.scad>
5 include <sealing-box.scad>
6 include <bike-lipo-box-gland.scad>
8 pxp6012_rad = 22.5 / 2 + 0.5; // make circular hole this size in outer wall
9 pxp6012_rad_outer = 32.0 / 2 - 0.5;
13 s1930_y_outer = 36.4 + 0.2;
14 s1930_x_outer = 27.6 + 0.2;
36 totx_outer = totx_inner + wallthick*2;
37 toty_inner = toty_outer - wallthick*2;
38 totz_outer = totz_inner + wallthick*2;
40 sb_box_sz = [totx_outer, totz_outer, toty_inner];
42 // origin is at centre on outer face wall
43 // outside is towards positive x
44 // mounting is vertical
45 module S1930_Positive(){
46 d = s1930_recess + s1930_behind;
47 translate([-d/2, 0,0])
49 s1930_x_outer + s1930_around,
50 s1930_y_outer + s1930_around], center=true);
52 module S1930_Negative(){
53 cube([60, s1930_x, s1930_y],
56 cube([s1930_recess*2+2, s1930_x_outer, s1930_y_outer],
60 module TestWall(){ ////toplevel
61 sw_ctr = [25, wallthick, 25];
66 cube([50, wallthick, 42]);
69 translate([30, -1, 20])
71 cylinder(r = pxp6012_rad, h=10, $fn=60);
74 Commitid_BestCount([15,40]);
80 cube([50, wallthick, 50]);
97 ts_box_sz = [ts_totx, ts_toty, ts_totz_inner];
99 $sealingbox_wallth = wallthick;
100 $sealingbox_floorth = wallthick;
101 $sealingbox_ceilth = wallthick;
103 module TestSealBox(){ ////toplevel
104 $sealingbox_sz = ts_box_sz;
106 SealingBox_RectBox();
107 ts_cidoff = ($sealingbox_cnrrad * (1-.7) + wallthick * .8) * [1,1];
109 Commitid_BestCount([ts_totx,ts_toty] - 2*ts_cidoff);
112 module TestSealLid(){ ////toplevel
113 $sealingbox_sz = ts_box_sz;
116 SealingBox_RectLid();
118 translate([ts_totx * .75, ts_toty/2, 0])
119 cylinder(h=100, r=5);
121 translate([-wallthick + $sealingbox_cnrrad*.5,
122 $sealingbox_cnrrad*.5 - wallthick,
123 ts_totz_inner + $sealingbox_ceilth])
124 Commitid_BestCount([ts_totx * .75 - 2.5 - ($sealingbox_cnrrad*.5),
125 ts_toty - ($sealingbox_cnrrad*.5 - wallthick)*2]);
129 module TestSealLidPrint(){ ////toplevel
130 rotate([180,0,0]) TestSealLid();
133 module ProfileDemos(){ ////toplevel
134 $sealingbox_sz = ts_box_sz;
136 SealingBox_WallProfile();
137 color("blue") SealingBox_FloorProfile();
138 SealingBox_LidProfile();
139 color("blue") SealingBox_CeilProfile();
140 color("red") translate([-5,0]) square([1,ts_totz_inner]);
144 for (dgy=[-15,-45]) {
145 translate([totx_inner + wallthick - $sealingbox_cnrrad * .3,
152 module Box(){ ////toplevel
153 $sealingbox_sz = sb_box_sz;
155 chargingconn_x = pxp6012_rad_outer + 1 + $sealingbox_cnrrad;
156 switch_x = chargingconn_x + pxp6012_rad_outer
157 + s1930_y_outer/2 + s1930_around;
159 strap_x_tot = strap_w + strap_pillar*2;
164 translate([-wallthick,-wallthick, -toty_inner])
165 SealingBox_RectBox();
167 translate([switch_x, toty_inner, totz_inner/2])
172 for (kx= [ 40, 80, 120 ]) {
173 translate([kx, 40, -1])
178 GlandPositive(cabledia);
181 // charging connector
182 translate([chargingconn_x,
183 toty_inner - (pxp6012_rad_outer + 5),
185 cylinder(r= pxp6012_rad, h= totz_outer);
187 translate([switch_x, toty_inner, totz_inner/2])
192 GlandNegative(cabledia);
194 translate($sealingbox_cnrrad * [1,1,0] +
195 [0, toty_inner/2, -wallthick])
200 module BoxPrint(){ ////toplevel
209 //FArcSegment_mask(350);