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;
25 cube([50, wallthick, 42]);
28 translate([30, -1, 20])
30 cylinder(r = pxp6012_rad, h=10, $fn=60);
33 Commitid_BestCount([15,40]);
39 cube([50, wallthick, 50]);
42 cube([s1930_x_outer + s1930_around,
43 s1930_y_outer + s1930_around,
51 cube([s1930_x, s1930_y, 10], center=true);
53 cube([s1930_x_outer, s1930_y_outer, 10], center=true);
61 innertube = 1.0 + 0.2;
71 ts_cidoff = (ts_cnrrad * (1-.7) + wallthick * .8) * [1,1];
73 m4_dnl Box_Part($1=transl_x,$2=transl_y, $3=rot_z,$4=mirror_xy)
74 m4_dnl $5=kind, $6=kindargs, $7=profile(profileargsargs))
75 m4_define(`Box_Part',`
76 translate([($1),($2)])
79 BoxPart_Extrude_$5($6, $7)') m4_dnl
83 m4_dnl BoxPart_Extrude_Linear(dist, `profile(...);');
84 m4_define(`BoxPart_Extrude_Linear',`
86 translate([0,0, -($1)])
87 linear_extrude(height= boxpart_d + ($1)) {
92 m4_dnl BoxPart_Extrude_Arc(x0_radius, swept_angle, `profile(...);')
93 m4_dnl arc starting at transl_x, transl_y, moving towards positive
94 m4_dnl y at first and then bending towards negative x, until
95 m4_dnl use negative x0_radius to inciate bending towards positive x
96 m4_dnl swept_angle is reached
97 m4_dnl x0_radius is the radius of the extruded part at x=0, not of the box
98 m4_define(`BoxPart_Extrude_Arc',`
99 translate([-($1),0,0])
101 translate([0,0,-500])
102 linear_extrude(height=1000)
104 mirror([($1)<0, 0,0])
105 FArcSegment_mask($2);
106 rotate_extrude(convexity=10, $fs=1, $fn=36)
107 mirror([($1)<0, 0,0])
108 translate([+($1),0,0]){
114 ts_xbox_lin = ts_xbox - ts_cnrrad*2;
115 ts_ybox_lin = ts_ybox - ts_cnrrad*2;
117 m4_dnl TestSealDoBoxShape(`profile(profileargs)');
118 m4_define(`TestSealDoBoxShape',`
119 Box_Part(0, ts_cnrrad, 0,0, Linear,`ts_ybox_lin', `$1' )
120 Box_Part(0, ts_ybox-ts_cnrrad, 0,0, Arc,`-ts_cnrrad,90' , `$1' )
121 Box_Part(ts_cnrrad, ts_ybox, -90,0, Linear,`ts_xbox_lin', `$1' )
122 Box_Part(ts_xbox-ts_cnrrad, ts_ybox, -90,0, Arc,`-ts_cnrrad,90' , `$1' )
123 Box_Part(ts_xbox, ts_ybox-ts_cnrrad, -180,0, Linear,`ts_ybox_lin', `$1' )
124 Box_Part(ts_xbox, ts_cnrrad, -180,0, Arc,`-ts_cnrrad,90' , `$1' )
125 Box_Part(ts_xbox-ts_cnrrad, 0, -270,0, Linear,`ts_xbox_lin', `$1' )
126 Box_Part(ts_cnrrad, 0, -270,0, Arc,`-ts_cnrrad,90' , `$1' )
131 module WallProfile(){
132 z = ts_zbox - innertube - tubesealrad;
133 translate([0, -0.1]) square([wallthick, z]);
134 translate([tubesealrad, z]) circle(r=tubesealrad, $fn=20);
137 module FloorProfile(){
138 mirror([0,1]) square([wallthick, floorth]);
142 rad = tubesealrad + innertube;
145 translate([-lidoverlap - innertube,
146 ts_zbox - lidoverhang - innertube])
147 square([lidoverlap + innertube + wallthick,
148 lidoverhang + innertube + ceilth]);
150 translate([tubesealrad,
151 ts_zbox - innertube - tubesealrad])
157 circle(r= tubesealrad + innertube, $fn=20);
163 module CeilProfile(){
164 translate([0, ts_zbox])
165 square([wallthick*2, ceilth]);
168 module TestSealBox(){ ////toplevel
169 TestSealDoBoxShape(WallProfile(););
170 hull(){ TestSealDoBoxShape(FloorProfile();); }
172 Commitid_BestCount([ts_xbox,ts_ybox] - 2*ts_cidoff);
175 module TestSealLid(){ ////toplevel
178 TestSealDoBoxShape(LidProfile(););
179 hull(){ TestSealDoBoxShape(CeilProfile();); }
181 translate([ts_xbox/2, ts_ybox/2, 0])
182 cylinder(h=100, r=5);
186 module TestSealLidPrint(){ ////toplevel
187 rotate([180,0,0]) TestSealLid();
190 module ProfileDemos(){
192 color("blue") FloorProfile();
194 color("blue") CeilProfile();
201 //FArcSegment_mask(350);