3 m4_dnl Box_Part($1=transl_x,$2=transl_y, $3=rot_z,$4=mirror_xy)
4 m4_dnl $5=kind, $6=kindargs, $7=profile(profileargsargs))
9 BoxPart_Extrude_$5($6, $7)') m4_dnl
13 m4_dnl BoxPart_Extrude_Linear(dist, `profile(...);');
14 m4_define(`BoxPart_Extrude_Linear',`
16 translate([0,0, -($1)])
17 linear_extrude(height= boxpart_d + ($1)) {
22 m4_dnl BoxPart_Extrude_Arc(x0_radius, swept_angle, `profile(...);')
23 m4_dnl arc starting at transl_x, transl_y, moving towards positive
24 m4_dnl y at first and then bending towards negative x, until
25 m4_dnl use negative x0_radius to inciate bending towards positive x
26 m4_dnl swept_angle is reached
27 m4_dnl x0_radius is the radius of the extruded part at x=0, not of the box
28 m4_define(`BoxPart_Extrude_Arc',`
29 translate([-($1),0,0])
32 linear_extrude(height=1000)
36 rotate_extrude(convexity=10, $fs=1, $fn=36)
38 translate([+($1),0,0]){
44 ts_cidoff = (ts_cnrrad * (1-.7) + wallthick * .8) * [1,1];
46 ts_xbox_lin = ts_xbox - ts_cnrrad*2;
47 ts_ybox_lin = ts_ybox - ts_cnrrad*2;
49 m4_dnl TestSealDoBoxShape(`profile(profileargs)');
50 m4_define(`TestSealDoBoxShape',`
51 Box_Part(0, ts_cnrrad, 0,0, Linear,`ts_ybox_lin', `$1' )
52 Box_Part(0, ts_ybox-ts_cnrrad, 0,0, Arc,`-ts_cnrrad,90' , `$1' )
53 Box_Part(ts_cnrrad, ts_ybox, -90,0, Linear,`ts_xbox_lin', `$1' )
54 Box_Part(ts_xbox-ts_cnrrad, ts_ybox, -90,0, Arc,`-ts_cnrrad,90' , `$1' )
55 Box_Part(ts_xbox, ts_ybox-ts_cnrrad, -180,0, Linear,`ts_ybox_lin', `$1' )
56 Box_Part(ts_xbox, ts_cnrrad, -180,0, Arc,`-ts_cnrrad,90' , `$1' )
57 Box_Part(ts_xbox-ts_cnrrad, 0, -270,0, Linear,`ts_xbox_lin', `$1' )
58 Box_Part(ts_cnrrad, 0, -270,0, Arc,`-ts_cnrrad,90' , `$1' )
64 z = ts_zbox - innertube - tubesealrad;
65 translate([0, -0.1]) square([wallthick, z]);
66 translate([tubesealrad, z]) circle(r=tubesealrad, $fn=20);
69 module FloorProfile(){
70 mirror([0,1]) square([wallthick, floorth]);
74 rad = tubesealrad + innertube;
77 translate([-lidoverlap - innertube,
78 ts_zbox - lidoverhang - innertube])
79 square([lidoverlap + innertube + wallthick,
80 lidoverhang + innertube + ceilth]);
82 translate([tubesealrad,
83 ts_zbox - innertube - tubesealrad])
89 circle(r= tubesealrad + innertube, $fn=20);
96 translate([0, ts_zbox])
97 square([wallthick*2, ceilth]);
100 module TestSealBoxBox(){
101 TestSealDoBoxShape(WallProfile(););
102 hull(){ TestSealDoBoxShape(FloorProfile();); }
105 module TestSealBoxLid(){ ////toplevel
106 TestSealDoBoxShape(LidProfile(););
107 hull(){ TestSealDoBoxShape(CeilProfile();); }