chiark / gitweb /
cable-hole-trunking-cover: sides using polygon
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 16 Dec 2012 20:27:57 +0000 (20:27 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 16 Dec 2012 20:27:57 +0000 (20:27 +0000)
cable-hole-trunking-cover.scad

index e874732..d599e82 100644 (file)
@@ -68,10 +68,16 @@ module Base(cutouty){
 module Lid(){
   lidx = basex + endslop + endwallt;
   for (mir=[0,1]) mirror([0,mir,0]) {
-    translate([0, basey/2 + sideslop, 0])
-      sheared_cube([lidx, sidewallt, bevelz], 0, bevelslope);
-    translate([0, basey/2 + sideslop + bevely, -tapethick])
-      cube([lidx, sidewallt, innerz + tapethick + lidt + zslop]);
+    translate([0, basey/2 + sideslop + bevely, 0])
+      rotate([90,0,90])
+      linear_extrude(height = lidx)
+      polygon([[0,         0],
+              [-bevely,   0],
+              [0,         bevelz],
+              [0,         innerz + lidt + zslop],
+              [sidewallt, innerz + lidt + zslop],
+              [sidewallt, -tapethick],
+              [0,         -tapethick]]);
     translate([0, -1, innerz + zslop])
       cube([lidx, 1 + basey/2 + sideslop + bevely + sidewallt, lidt]);
     translate([basex + endslop, -1, -tapethick])