// A. Rectangular boxes
// 1. include <sealing-box.scad>
// 2. assign() values to (xxx these should be $ variables)
+// $sealingbox_wallthick
// ts_xbox (outer dimensions)
// ts_ybox (outer dimension)
// ts_zbox (??? xxx)
')
m4_define(`BoxLocals',`
- ts_cidoff = (ts_cnrrad * (1-.7) + wallthick * .8) * [1,1];
+ wall = $sealingbox_wallthick;
+
+ ts_cidoff = (ts_cnrrad * (1-.7) + wall * .8) * [1,1];
ts_xbox_lin = ts_xbox - ts_cnrrad*2;
ts_ybox_lin = ts_ybox - ts_cnrrad*2;
module SealingBox_WallProfile(){
BoxLocals
z = ts_zbox - innertube - tubesealrad;
- translate([0, -0.1]) square([wallthick, z]);
+ translate([0, -0.1]) square([wall, z]);
translate([tubesealrad, z]) circle(r=tubesealrad, $fn=20);
}
module SealingBox_FloorProfile(){
BoxLocals
- mirror([0,1]) square([wallthick, floorth]);
+ mirror([0,1]) square([wall, floorth]);
}
module SealingBox_LidProfile(){
BoxLocals
rad = tubesealrad + innertube;
- morex = wallthick;
+ morex = wall;
difference(){
translate([-lidoverlap - innertube,
ts_zbox - lidoverhang - innertube])
- square([lidoverlap + innertube + wallthick,
+ square([lidoverlap + innertube + wall,
lidoverhang + innertube + ceilth]);
hull(){
translate([tubesealrad,
module SealingBox_CeilProfile(){
BoxLocals
translate([0, ts_zbox])
- square([wallthick*2, ceilth]);
+ square([wall*2, ceilth]);
}
// BoxDoShape(Basename,BoxDoShapeSomething)