chiark / gitweb /
sealing-box: reorg LidProfile for adding more near top left (nfc)
[reprap-play.git] / sealing-box.scad.m4
index 7ead2b8bdff93d6f668d8fb393ad8134225eae2a..47651937f2cff698afc3fd4edcb2ce7fe8b03490 100644 (file)
@@ -41,13 +41,13 @@ m4_define(`BoxLocals',`
 
   xbox_lin = xbox - cnrrad*2;
   ybox_lin = ybox - cnrrad*2;
-
-  innertube = 1.0 + 0.2;
-  lidoverlap = 1.5;
-  lidoverhang = 6;
-  tubesealrad = 2.0;
 ')
 
+m4_define(`innertube', `(1.0 + 0.2)')
+m4_define(`lidoverlap', `1.5')
+m4_define(`lidoverhang', `6')
+m4_define(`tubesealrad', `2.0')
+
 m4_define(`BoxFn',`$fn= $sealingbox_crude ? ($2) : ($1)')
 
 m4_dnl Box_Part($1=transl_x,$2=transl_y, $3=rot_z,$4=mirror_xy)
@@ -117,15 +117,19 @@ module SealingBox_FloorProfile(){
   mirror([0,1]) square([wall, floorth]);
 }
 
+function SealingBox_lidbigger() = lidoverlap + innertube;
+
 module SealingBox_LidProfile(){
   BoxLocals
   rad = tubesealrad + innertube;
   morex = wall;
   difference(){
-    translate([-lidoverlap - innertube,
-              zbox - lidoverhang - innertube])
-      square([lidoverlap + innertube + wall,
+    translate([0, zbox + ceilth]) mirror([0,1]) {
+      translate([-SealingBox_lidbigger(),
+                0])
+      square([lidoverlap + innertube + tubesealrad,
              lidoverhang + innertube + ceilth]);
+    }
     hull(){
       translate([tubesealrad,
                 zbox - innertube - tubesealrad])