chiark / gitweb /
led-panel-ceiling-bracket: wip
[reprap-play.git] / led-panel-ceiling-bracket.scad
1 // -*- C -*-
2
3 holespc = 20;
4
5 len = 50;
6 width = 20;
7 backspc = 10;
8 light_height = 12.5;
9 hole_from_back = 7.2 + 0.5;
10 hole_dia = 3.5 + 0.5;
11 bolthead_dia = 7 + 1.0;
12 bolthead_depth = 5;
13
14 height = light_height + backspc;
15
16 octagon_fudge = 1/cos(22.5);
17
18 module Bracket(){
19   difference(){
20     translate([-len/2, 0,0])
21       cube([len, width, height]);
22     for (xsgn=[-1,+1]) {
23       translate([xsgn * holespc/2, -1, light_height - hole_from_back]) {
24         rotate([-90,0,0]) {
25           rotate([0,0,360/8/2]) {
26             cylinder(r=bolthead_dia/2 * octagon_fudge,
27                      h= bolthead_depth +1, $fn=8);
28             cylinder(r=hole_dia/2 * octagon_fudge,
29                      h=50, $fn=8);
30           }
31         }
32       }
33     }
34   }
35 }
36
37 Bracket();