chiark / gitweb /
osstest-arm-net-bracket: wip t2streng - transpose so cutout works too
[reprap-play.git] / osstest-arm-net-bracket.scad
1 // -*- C -*-
2
3 holedist = 64;
4 tonguewidth = 10;
5 tongue2width = 15;
6 totaldepth = 26;
7 tongue2depth = 35;
8 thick = 4;
9 tabover = 7+6;
10 tabunder = 15;
11
12 tabsidel = 7;
13 tabsider = 7+10;
14
15 tonguethick = 4;
16 tongue2thick = 5;
17 strapthick = 2;
18 strapwidth = 5;
19 ridgewidth = 2;
20
21 hstrengthick = 2.5;
22 hstrengdepth = strapwidth;
23
24 cutoutover = 7;
25 rcutoutside = 7+2 - 0.5;
26 lcutoutside = 7-6.5 - 0.5;
27
28 t2strengwidth = 10;
29
30 holedia = 3.5;
31
32 tongue2x = tongue2width - holedist;
33
34 module Tongue(tw,tt,ad,slots=2){
35   y0=thick+0.1;
36   yn=ad-ridgewidth-strapwidth;
37   difference(){
38     union(){
39       translate([-tw, 0, 0])
40         cube([tw, ad, tt+strapthick]);
41       child();
42     }
43     for (yi=[1:slots-1])
44       translate([-tw-1, y0 + (yn-y0)*yi/(slots-1), tt])
45         cube([tw+2, strapwidth, strapthick+0.05]);
46   }
47 }
48
49 module Body(){
50   translate([-holedist-tabsider, 0, 0]) {
51     cube([tabsidel+tabsider+holedist, thick, tabunder+tabover]);
52     cube([tabsidel+tabsider+holedist, thick+hstrengdepth, hstrengthick]);
53   }
54   Tongue(tonguewidth,tonguethick,totaldepth,3);
55   translate([tongue2x,0,0])
56     Tongue(tongue2width,tongue2thick,tongue2depth+thick,5) {
57     hull(){
58       translate([-(tongue2width-t2strengwidth)/2, 0,0])
59         mirror([1,0,0])
60         cube([t2strengwidth,50,20]);
61     }
62   }
63 }
64
65 module Object(){
66   difference(){
67     Body();
68     translate([0,-25,tabunder+cutoutover]) {
69       translate([-(holedist+rcutoutside), 0,0])
70         mirror([1,0,0])
71         cube([50,50,50]);
72       translate([lcutoutside, 0,0])
73         cube([50,50,50]);
74     }
75     for (x=[-holedist,0])
76       translate([x, 0, tabunder]) {
77         translate([0, -1, 0]) {
78           rotate([-90,0,0]) {
79             cylinder(r= holedia/2+0.5, h=thick+2, $fn=20);
80           }
81         }
82         translate([0, 19.95 + thick, 0])
83           cube(center=true,[10,40,10]);
84       }
85   }
86 }
87
88 Object();