chiark / gitweb /
led-panel-ceiling-bracket: Fix plasplug size
[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 + 20 - 12 + 2.7/2;
14
15 plasfix_dia = 4.5 + 0.5 + 1.1;
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     for (xsgn=[-1,+1]) {
29       translate([xsgn * holespc/2, -1,
30                  light_height - hole_from_back + extra_height]) {
31         rotate([-90,0,0]) {
32           rotate([0,0,360/8/2]) {
33             cylinder(r=bolthead_dia/2 * octagon_fudge,
34                      h= bolthead_depth +1, $fn=8);
35             cylinder(r=hole_dia/2 * octagon_fudge,
36                      h=50, $fn=8);
37           }
38         }
39       }
40     }
41     translate([0, width/2, 0]) {
42       cylinder(r= plasfix_dia/2, h=50, $fn=20);
43       hull(){
44         cylinder(r= plasfix_dia/2, h= plasfix_headdep + plasfix_sink, $fn=20);
45         translate([0,0,-1])
46           cylinder(r= plasfix_head/2, h= plasfix_sink + 1, $fn=20);
47       }
48     }
49   }
50 }
51
52 Bracket();