chiark / gitweb /
cable-hole-trunking-cover: wip, hole
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 16 Dec 2012 18:36:46 +0000 (18:36 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 16 Dec 2012 18:36:46 +0000 (18:36 +0000)
cable-hole-trunking-cover.scad

index c8a5606..889a97b 100644 (file)
@@ -1,7 +1,12 @@
 // -*- C -*-
 
-basex = 30;
-basey = 45;
+holedia = 25.4;
+
+sidewidth = 5;
+tapewidth = 7;
+
+basex = holedia + sidewidth*2;
+basey = holedia + tapewidth*2;
 
 bevelz = 3;
 bevelslope = 0.75;
@@ -19,10 +24,17 @@ module sheared_cube(sz, xperz, yperz) {
 }
 
 module Base(){
-  translate([0, basey-basebevelt, 0])
-    sheared_cube([basex, basebevelt, bevelz], 0, bevelslope);
-  sheared_cube([basex, basebevelt, bevelz], 0, -bevelslope);
-  cube([basex, basey, basebaset]);
+  difference(){
+    union(){
+      translate([0, basey-basebevelt, 0])
+       sheared_cube([basex, basebevelt, bevelz], 0, bevelslope);
+      sheared_cube([basex, basebevelt, bevelz], 0, -bevelslope);
+      cube([basex, basey, basebaset]);
+    }
+    translate([basex/2, basey/2, -1])
+      cylinder(r=holedia/2, h=bevelz+2);
+  }
+    
 //  sheared_cube([10,20,30], 0.5, 3);
 //  cube([basew, baseh, 0.1]);
 //  translate([