chiark / gitweb /
light-bracket: wip, new base
[reprap-play.git] / light-bracket.scad
index 66d406fc5cd954407ea48468808dca719bafc4f7..3b4297072d1e785478cc96e5f8d3b7554cd02c99 100644 (file)
@@ -10,6 +10,8 @@ base_margin=4.0;
 base_width=remote_width-base_margin*2;
 base_height=remote_height-base_margin*2;
 
+// origin is base of mainhole
+
 module mainhole() {
        translate([ -remote_width/2, 0, 0 ])
        cube(center=false,
@@ -42,16 +44,37 @@ module hstuff() {
        translate([-10,0,0]) hhookbot(15);
 }
 
+module base() {
+       difference() {
+               translate([ 0, base_height/2 + base_margin, -base_thick/2 ])
+                       cube(center=true,
+                               [ base_width, base_height, base_thick+10 ]);
+       }
+//     translate([-base_width/2, base_margin, -base_thick*2])
+//             cube(center=false, [base_width,base_height,base_thick+10]);
+}
+
+screw_ys=[ 20, remote_height-30 ];
+
 module stuff() {
        hstuff();
        mirror([1,0,0]) hstuff();
-       translate([-base_width/2, base_margin, -base_thick*2])
-               cube(center=false, [base_width,base_height,base_thick+10]);
+       base();
+       //for (y=screw_ys)
+}
+
+module screwhole(holedia, csdia) {
+       // screw goes along z axis downwards
+       // origin is base of countersink
+       // results are positive, so this should be subtracted
+       translate([0,0,-100]) cylinder(h=200, r=holedia/2);
+       cylinder(h=100, r=csdia/2);
 }
 
 difference() {
        stuff();
        mainhole();
+       for (y=screw_ys) translate([0, y, -base_thick+2]) screwhole(4,10);
        translate([0,0,-50 - base_thick])
                cube(center=true,[300,300,100]); // print bed
 }