From 202fdb2747d398b95228d33ee12c1d1ab84e5d8f Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sat, 13 Feb 2016 21:48:09 +0000 Subject: [PATCH] sealing-box, bike-lipo-box: $-ise wallthick --- bike-lipo-box.scad | 2 ++ sealing-box.scad.m4 | 15 +++++++++------ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/bike-lipo-box.scad b/bike-lipo-box.scad index 43be1dd..bde5ece 100644 --- a/bike-lipo-box.scad +++ b/bike-lipo-box.scad @@ -68,6 +68,8 @@ module TestWall(){ ////toplevel } } +$sealingbox_wallthick = wallthick; + floorth = 2.5; ceilth = 2.5; innertube = 1.0 + 0.2; diff --git a/sealing-box.scad.m4 b/sealing-box.scad.m4 index 33b1069..cbdff22 100644 --- a/sealing-box.scad.m4 +++ b/sealing-box.scad.m4 @@ -5,6 +5,7 @@ // A. Rectangular boxes // 1. include // 2. assign() values to (xxx these should be $ variables) +// $sealingbox_wallthick // ts_xbox (outer dimensions) // ts_ybox (outer dimension) // ts_zbox (??? xxx) @@ -62,7 +63,9 @@ m4_define(`BoxPart_Extrude_Arc',` ') 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; @@ -85,23 +88,23 @@ m4_dnl ' 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, @@ -120,7 +123,7 @@ module SealingBox_LidProfile(){ module SealingBox_CeilProfile(){ BoxLocals translate([0, ts_zbox]) - square([wallthick*2, ceilth]); + square([wall*2, ceilth]); } // BoxDoShape(Basename,BoxDoShapeSomething) -- 2.30.2