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