chiark / gitweb /
pattress-boxes-3-cover: LidSideProfile, wip
[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 = 8.7 + 0.5 + 1.1;
17 plasfix_headdep = plasfix_dia;
18 plasfix_sink = 8;
19
20 height = light_height + backspc + extra_height;
21
22 octagon_fudge = 1/cos(22.5);
23
24 echo("remain", width - bolthead_depth);
25
26 module Bracket(){
27   difference(){
28     translate([-len/2, 0, 0])
29       cube([len, width, height]);
30     for (xsgn=[-1,+1]) {
31       translate([xsgn * holespc/2, -1,
32                  light_height - hole_from_back + extra_height]) {
33         rotate([-90,0,0]) {
34           rotate([0,0,360/8/2]) {
35             cylinder(r=bolthead_dia/2 * octagon_fudge,
36                      h= bolthead_depth +1, $fn=8);
37             cylinder(r=hole_dia/2 * octagon_fudge,
38                      h=50, $fn=8);
39           }
40         }
41       }
42     }
43     translate([0, width/2, 0]) {
44       cylinder(r= plasfix_dia/2, h=50, $fn=20);
45       translate([0,0,-1])
46         cylinder(r= plasfix_head/2, h= plasfix_sink + 1, $fn=20);
47     }
48   }
49 }
50
51 module BracketPrint(){
52   rotate([0,180,0])
53     Bracket();
54 }
55
56 BracketPrint();