chiark / gitweb /
46dba841150e301dd068b65aefd01002f2d792b5
[reprap-play.git] / osstest-arm-psu-bracket.scad
1 // -*- C -*-
2
3 mainlen = 30;
4 straps = [10,20];
5 width = 60;
6 endwall = 5;
7 sidewall = 8;
8 basethick = 3;
9 endwallheight = 20;
10
11 plugwidth = 35;
12 plugstartheight = 10;
13
14 strapthick = 4;
15 strapwidth = 5;
16 strapbotgap = 1;
17 overstrap = 6;
18
19 discdia = 60;
20 discoff = 10;
21
22 sidewallraise = strapbotgap + strapthick + overstrap;
23
24 module Sides(){
25   difference(){
26     for (y=[0, width-sidewall]) {
27       translate([0,y,0])
28         cube([mainlen, sidewall, basethick + sidewallraise]);
29     }
30     for (x=straps) {
31       translate([x, 0, basethick + strapbotgap + strapthick/2])
32         cube([strapwidth, width*3, strapthick], center=true);
33     }
34   }
35 }
36
37 module Ell(){
38   translate([-endwall,0,0]) {
39     cube([mainlen + endwall, width, basethick]);
40     cube([endwall+0.1, width, endwallheight + sidewallraise + basethick]);
41   }
42 }
43
44 module Plug(){
45   translate([0, width/2,
46              basethick + sidewallraise + plugstartheight + 50])
47     cube([endwall*3, plugwidth, 100], center=true);
48 }
49
50 module Disc(){
51   translate([discoff + discdia/2, width/2, -1])
52     cylinder(r=discdia/2, h=50);
53 }
54
55 module Block(){
56   difference(){
57     union(){
58       Ell();
59       Sides();
60     }
61     Plug();
62     Disc();
63   }
64 }
65
66 Block();