3 include <commitid.scad>
6 pxp6012_rad = 22.5 / 2 + 0.5;
7 pxp6012_rad_outer = 32.0 / 2 - 0.5;
11 s1930_y_outer = 36.4 + 0.2;
12 s1930_x_outer = 27.6 + 0.2;
20 // origin is at centre on outer face wall
21 // outside is towards positive x
22 // mounting is vertical
23 module S1930_Positive(){
24 d = s1930_recess + s1930_behind;
25 translate([-d/2, 0,0])
27 s1930_x_outer + s1930_around,
28 s1930_y_outer + s1930_around], center=true);
31 module TestWall(){ ////toplevel
34 wallthick + 0.5, // xxx compatibility bug
40 cube([50, wallthick, 42]);
43 translate([30, -1, 20])
45 cylinder(r = pxp6012_rad, h=10, $fn=60);
48 Commitid_BestCount([15,40]);
54 cube([50, wallthick, 50]);
62 cube([s1930_x, s1930_y, 10], center=true);
64 cube([s1930_x_outer, s1930_y_outer, 10], center=true);
72 innertube = 1.0 + 0.2;
82 ts_cidoff = (ts_cnrrad * (1-.7) + wallthick * .8) * [1,1];
84 m4_dnl Box_Part($1=transl_x,$2=transl_y, $3=rot_z,$4=mirror_xy)
85 m4_dnl $5=kind, $6=kindargs, $7=profile(profileargsargs))
86 m4_define(`Box_Part',`
87 translate([($1),($2)])
90 BoxPart_Extrude_$5($6, $7)') m4_dnl
94 m4_dnl BoxPart_Extrude_Linear(dist, `profile(...);');
95 m4_define(`BoxPart_Extrude_Linear',`
97 translate([0,0, -($1)])
98 linear_extrude(height= boxpart_d + ($1)) {
103 m4_dnl BoxPart_Extrude_Arc(x0_radius, swept_angle, `profile(...);')
104 m4_dnl arc starting at transl_x, transl_y, moving towards positive
105 m4_dnl y at first and then bending towards negative x, until
106 m4_dnl use negative x0_radius to inciate bending towards positive x
107 m4_dnl swept_angle is reached
108 m4_dnl x0_radius is the radius of the extruded part at x=0, not of the box
109 m4_define(`BoxPart_Extrude_Arc',`
110 translate([-($1),0,0])
112 translate([0,0,-500])
113 linear_extrude(height=1000)
115 mirror([($1)<0, 0,0])
116 FArcSegment_mask($2);
117 rotate_extrude(convexity=10, $fs=1, $fn=36)
118 mirror([($1)<0, 0,0])
119 translate([+($1),0,0]){
125 ts_xbox_lin = ts_xbox - ts_cnrrad*2;
126 ts_ybox_lin = ts_ybox - ts_cnrrad*2;
128 m4_dnl TestSealDoBoxShape(`profile(profileargs)');
129 m4_define(`TestSealDoBoxShape',`
130 Box_Part(0, ts_cnrrad, 0,0, Linear,`ts_ybox_lin', `$1' )
131 Box_Part(0, ts_ybox-ts_cnrrad, 0,0, Arc,`-ts_cnrrad,90' , `$1' )
132 Box_Part(ts_cnrrad, ts_ybox, -90,0, Linear,`ts_xbox_lin', `$1' )
133 Box_Part(ts_xbox-ts_cnrrad, ts_ybox, -90,0, Arc,`-ts_cnrrad,90' , `$1' )
134 Box_Part(ts_xbox, ts_ybox-ts_cnrrad, -180,0, Linear,`ts_ybox_lin', `$1' )
135 Box_Part(ts_xbox, ts_cnrrad, -180,0, Arc,`-ts_cnrrad,90' , `$1' )
136 Box_Part(ts_xbox-ts_cnrrad, 0, -270,0, Linear,`ts_xbox_lin', `$1' )
137 Box_Part(ts_cnrrad, 0, -270,0, Arc,`-ts_cnrrad,90' , `$1' )
142 module WallProfile(){
143 z = ts_zbox - innertube - tubesealrad;
144 translate([0, -0.1]) square([wallthick, z]);
145 translate([tubesealrad, z]) circle(r=tubesealrad, $fn=20);
148 module FloorProfile(){
149 mirror([0,1]) square([wallthick, floorth]);
153 rad = tubesealrad + innertube;
156 translate([-lidoverlap - innertube,
157 ts_zbox - lidoverhang - innertube])
158 square([lidoverlap + innertube + wallthick,
159 lidoverhang + innertube + ceilth]);
161 translate([tubesealrad,
162 ts_zbox - innertube - tubesealrad])
168 circle(r= tubesealrad + innertube, $fn=20);
174 module CeilProfile(){
175 translate([0, ts_zbox])
176 square([wallthick*2, ceilth]);
179 module TestSealBox(){ ////toplevel
180 TestSealDoBoxShape(WallProfile(););
181 hull(){ TestSealDoBoxShape(FloorProfile();); }
183 Commitid_BestCount([ts_xbox,ts_ybox] - 2*ts_cidoff);
186 module TestSealLid(){ ////toplevel
189 TestSealDoBoxShape(LidProfile(););
190 hull(){ TestSealDoBoxShape(CeilProfile();); }
192 translate([ts_xbox * .75, ts_ybox/2, 0])
193 cylinder(h=100, r=5);
195 translate([-wallthick + ts_cnrrad*.5,
196 ts_cnrrad*.5 - wallthick,
198 Commitid_BestCount([ts_xbox * .75 - 2.5 - (ts_cnrrad*.5),
199 ts_ybox - (ts_cnrrad*.5 - wallthick)*2]);
203 module TestSealLidPrint(){ ////toplevel
204 rotate([180,0,0]) TestSealLid();
207 module ProfileDemos(){
209 color("blue") FloorProfile();
211 color("blue") CeilProfile();
218 //FArcSegment_mask(350);