chiark / gitweb /
sewing-table: RoundCorner rework: use new centres
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 3 Jun 2017 20:09:53 +0000 (21:09 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 3 Jun 2017 20:09:53 +0000 (21:09 +0100)
sewing-table.scad.m4

index 3132b11..a407c7a 100644 (file)
@@ -281,10 +281,8 @@ module RoundCornerCut(ci) {
   ROUNDCORNER_VARS;
   difference(){
     RoundCorner_selector(ci, -0.1);
-    INREFFRAME(this_cnr, right_cnr) INREFFRAME_EDGE {
-      translate([bigr, bigr, 0])
-       cylinder(center=true, h=20, r= bigr);
-    }
+    translate(concat(ctr,[0]))
+      cylinder(center=true, h=20, r= bigr);
   }
 }
 
@@ -292,15 +290,16 @@ module RoundCornerAdd(ci) {
   ROUNDCORNER_VARS;
   intersection(){
     RoundCorner_selector(ci, +0.1);
-    INREFFRAME(this_cnr, right_cnr) INREFFRAME_EDGE {
-      translate([bigr, bigr, 0])
+    INREFFRAME_EDGE {
+      translate(concat(ctr,[0])){
        rotate_extrude(convexity=10, $fn=50)
-       translate([bigr, 0])
-       difference(){
+         translate([bigr, 0])
+         difference(){
          circle(r= round_edge_rad, $fn=50);
          mirror([1,1])
            square([20,20]);
-        }
+       }
+      }
     }
   }
 }