chiark / gitweb /
sealing-box, bike-lipo-box: combine $sealingbox_sz out of _xbox et al (nfc)
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 13 Feb 2016 22:26:01 +0000 (22:26 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 13 Feb 2016 22:26:01 +0000 (22:26 +0000)
bike-lipo-box.scad
sealing-box.scad.m4

index 6ad60b0a2a964d16a2aa0129b5758bd73c683501..850200b498a0c75c579fdcdd45c7b4285913ae50 100644 (file)
@@ -73,14 +73,14 @@ ts_totx = 30;
 ts_toty = 25;
 ts_totz_inner = 8;
 
 ts_toty = 25;
 ts_totz_inner = 8;
 
+ts_box_sz = [ts_totx, ts_toty, ts_totz_inner];
+
 $sealingbox_wallth = wallthick;
 $sealingbox_floorth = wallthick;
 $sealingbox_ceilth = wallthick;
 
 module TestSealBox(){ ////toplevel
 $sealingbox_wallth = wallthick;
 $sealingbox_floorth = wallthick;
 $sealingbox_ceilth = wallthick;
 
 module TestSealBox(){ ////toplevel
-  $sealingbox_xbox = ts_totx;
-  $sealingbox_ybox = ts_toty;
-  $sealingbox_zbox = ts_totz_inner;
+  $sealingbox_sz = ts_box_sz;
 
   SealingBox_RectBox();
   ts_cidoff = ($sealingbox_cnrrad * (1-.7) + wallthick * .8) * [1,1];
 
   SealingBox_RectBox();
   ts_cidoff = ($sealingbox_cnrrad * (1-.7) + wallthick * .8) * [1,1];
@@ -89,9 +89,7 @@ module TestSealBox(){ ////toplevel
 }
 
 module TestSealLid(){ ////toplevel
 }
 
 module TestSealLid(){ ////toplevel
-  $sealingbox_xbox = ts_totx;
-  $sealingbox_ybox = ts_toty;
-  $sealingbox_zbox = ts_totz_inner;
+  $sealingbox_sz = ts_box_sz;
 
   difference(){
     SealingBox_RectLid();
 
   difference(){
     SealingBox_RectLid();
@@ -112,9 +110,7 @@ module TestSealLidPrint(){ ////toplevel
 }
 
 module ProfileDemos(){ ////toplevel
 }
 
 module ProfileDemos(){ ////toplevel
-  $sealingbox_xbox = ts_totx;
-  $sealingbox_ybox = ts_toty;
-  $sealingbox_zbox = ts_totz_inner;
+  $sealingbox_sz = ts_box_sz;
 
   SealingBox_WallProfile();
   color("blue") SealingBox_FloorProfile();
 
   SealingBox_WallProfile();
   color("blue") SealingBox_FloorProfile();
index 2c06917da9d21e1cc29c9b28d547ae2725e6bfa6..31f7f65a1bd06c5fb905d96953f5e080d201d033 100644 (file)
@@ -6,9 +6,9 @@
 //      1. include <sealing-box.scad>
 //      2. assign() values to (xxx these should be $ variables)
 //           $sealingbox_wallth
 //      1. include <sealing-box.scad>
 //      2. assign() values to (xxx these should be $ variables)
 //           $sealingbox_wallth
-//           $sealingbox_xbox (outer dimension)
-//           $sealingbox_ybox (outer dimension)
-//           $sealingbox_zbox (inner dimension)
+//           $sealingbox_sz[0] (outer dimension)
+//           $sealingbox_sz[1] (outer dimension)
+//           $sealingbox_sz[2] (inner dimension)
 //           $sealingbox_ceilth
 //           $sealingbox_floorth
 //           $sealingbox_wallth
 //           $sealingbox_ceilth
 //           $sealingbox_floorth
 //           $sealingbox_wallth
@@ -30,9 +30,9 @@
 $sealingbox_cnrrad = 10;
 
 m4_define(`BoxLocals',`
 $sealingbox_cnrrad = 10;
 
 m4_define(`BoxLocals',`
-  xbox = $sealingbox_xbox;
-  ybox = $sealingbox_ybox;
-  zbox = $sealingbox_zbox;
+  xbox = $sealingbox_sz[0];
+  ybox = $sealingbox_sz[1];
+  zbox = $sealingbox_sz[2];
   wall = $sealingbox_wallth;
   floorth = $sealingbox_floorth;
   ceilth = $sealingbox_ceilth;
   wall = $sealingbox_wallth;
   floorth = $sealingbox_floorth;
   ceilth = $sealingbox_ceilth;