chiark / gitweb /
cable-hole-trunking-cover: BaseCBot too
[reprap-play.git] / cable-hole-trunking-cover.scad
index 07daa9d0579f8a1e9e42a78dadc927ed935909c4..e8747327e41481603606731bd9781ea5607deda8 100644 (file)
@@ -6,6 +6,8 @@ sidewidth = 5;
 tapewidth = 7;
 tapethick = 1;
 
+cutoutsz= 10;
+
 innerz = 10;
 
 basex = holedia + sidewidth*2;
@@ -33,7 +35,8 @@ module sheared_cube(sz, xperz, yperz) {
     cube(sz);
 }
 
-module Base(){
+module Base(cutouty){
+  echo(cutouty);
   difference(){
     union(){
       for (mir=[0,1]) mirror([0,mir,0]) {
@@ -45,15 +48,19 @@ module Base(){
     translate([basex/2, 0, -1])
       cylinder(r=holedia/2, h=bevelz+2);
   }
-  difference(){
-    for (mir=[0,1]) mirror([0,mir,0]) {
-      rotate([90, 0, 90])
-       linear_extrude(height=endwallt)
-       polygon([[-0.1,             0],
-                [basey/2,          0],
-                [basey/2 + bevely, bevelz],
-                [basey/2 + bevely, innerz],
-                [-0.1,             innerz]]);
+  rotate([90, 0, 90]) {
+    linear_extrude(height=endwallt) {
+      difference(){
+       for (mir=[0,1]) mirror([mir,0,0]) {
+           polygon([[-0.1,             0],
+                    [basey/2,          0],
+                    [basey/2 + bevely, bevelz],
+                    [basey/2 + bevely, innerz],
+                    [-0.1,             innerz]]);
+       }
+       translate([cutouty, 0])
+         square(size=[cutoutsz, 3*innerz], center=true);
+      }
     }
   }
 }
@@ -73,5 +80,23 @@ module Lid(){
   }
 }
 
-Base();
-%Lid();
+module LidT(){ ////toplevel
+  rotate([180,0,0]) Lid();
+}
+
+module BaseCMid(){ ////toplevel
+  Base(0);
+}
+
+module BaseCTop(){ ////toplevel
+  Base(basey/2 + bevely - cutoutsz/2);
+}
+
+module BaseCBot(){ ////toplevel
+  Base(-(basey/2 + bevely - cutoutsz/2));
+}
+
+//BaseCTop();
+//BaseCMid();
+//BaseCBot();
+//LidT();