3 include <commitid.scad>
5 include <sealing-box.scad>
7 pxp6012_rad = 22.5 / 2 + 0.5; // make circular hole this size in outer wall
8 pxp6012_rad_outer = 32.0 / 2 - 0.5;
12 s1930_y_outer = 36.4 + 0.2;
13 s1930_x_outer = 27.6 + 0.2;
27 totx_outer = totx_inner + wallthick*2;
28 toty_inner = toty_outer - wallthick*2;
29 totz_inner = totz_outer - wallthick*2;
31 sb_box_sz = [totx_outer, totz_outer, toty_inner];
33 // origin is at centre on outer face wall
34 // outside is towards positive x
35 // mounting is vertical
36 module S1930_Positive(){
37 d = s1930_recess + s1930_behind;
38 translate([-d/2, 0,0])
40 s1930_x_outer + s1930_around,
41 s1930_y_outer + s1930_around], center=true);
43 module S1930_Negative(){
44 cube([60, s1930_x, s1930_y],
47 cube([s1930_recess*2+2, s1930_x_outer, s1930_y_outer],
51 module TestWall(){ ////toplevel
52 sw_ctr = [25, wallthick, 25];
57 cube([50, wallthick, 42]);
60 translate([30, -1, 20])
62 cylinder(r = pxp6012_rad, h=10, $fn=60);
65 Commitid_BestCount([15,40]);
71 cube([50, wallthick, 50]);
88 ts_box_sz = [ts_totx, ts_toty, ts_totz_inner];
90 $sealingbox_wallth = wallthick;
91 $sealingbox_floorth = wallthick;
92 $sealingbox_ceilth = wallthick;
94 module TestSealBox(){ ////toplevel
95 $sealingbox_sz = ts_box_sz;
98 ts_cidoff = ($sealingbox_cnrrad * (1-.7) + wallthick * .8) * [1,1];
100 Commitid_BestCount([ts_totx,ts_toty] - 2*ts_cidoff);
103 module TestSealLid(){ ////toplevel
104 $sealingbox_sz = ts_box_sz;
107 SealingBox_RectLid();
109 translate([ts_totx * .75, ts_toty/2, 0])
110 cylinder(h=100, r=5);
112 translate([-wallthick + $sealingbox_cnrrad*.5,
113 $sealingbox_cnrrad*.5 - wallthick,
114 ts_totz_inner + $sealingbox_ceilth])
115 Commitid_BestCount([ts_totx * .75 - 2.5 - ($sealingbox_cnrrad*.5),
116 ts_toty - ($sealingbox_cnrrad*.5 - wallthick)*2]);
120 module TestSealLidPrint(){ ////toplevel
121 rotate([180,0,0]) TestSealLid();
124 module ProfileDemos(){ ////toplevel
125 $sealingbox_sz = ts_box_sz;
127 SealingBox_WallProfile();
128 color("blue") SealingBox_FloorProfile();
129 SealingBox_LidProfile();
130 color("blue") SealingBox_CeilProfile();
131 color("red") translate([-5,0]) square([1,ts_totz_inner]);
134 module Box(){ ////toplevel
135 $sealingbox_sz = sb_box_sz;
137 chargingconn_x = pxp6012_rad_outer + 1 + $sealingbox_cnrrad;
138 switch_x = chargingconn_x + pxp6012_rad_outer
139 + s1930_y_outer/2 + s1930_around;
144 translate([-wallthick,-wallthick, -toty_inner])
145 SealingBox_RectBox();
147 translate([switch_x, toty_inner, totz_inner/2])
152 // charging connector
153 translate([chargingconn_x,
154 toty_inner - (pxp6012_rad_outer + 5),
156 cylinder(r= pxp6012_rad, h= totz_outer);
158 translate([switch_x, toty_inner, totz_inner/2])
168 //FArcSegment_mask(350);