chiark / gitweb /
sealing-box: move BoxLocals (code motion, nfc)
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 13 Feb 2016 21:50:22 +0000 (21:50 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 13 Feb 2016 21:50:22 +0000 (21:50 +0000)
sealing-box.scad.m4

index cbdff22695a65943d79a0075c59f2226a61e765f..a076ddd0491a3983c5b7d230f67a5dc7d7b5d4ae 100644 (file)
 //      3. Invoke BoxUseShape
 //      4. Use the Box and Lid modules generated
 
+m4_define(`BoxLocals',`
+  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;
+')
+
 m4_dnl Box_Part($1=transl_x,$2=transl_y, $3=rot_z,$4=mirror_xy)
 m4_dnl          $5=kind, $6=kindargs, $7=profile(profileargsargs))
 m4_define(`Box_Part',`
@@ -62,15 +71,6 @@ m4_define(`BoxPart_Extrude_Arc',`
     }
 ')
 
-m4_define(`BoxLocals',`
-  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;
-')
-
 m4_dnl BoxDoShapeRect(`profile(profileargs)');
 m4_define(`BoxDoShapeRect',`
   Box_Part(0,               ts_cnrrad,    0,0, Linear,`ts_ybox_lin', `$1' )