chiark / gitweb /
earring-stand: deal with some comments and formatting
[reprap-play.git] / osstest-arm-hub-bracket.scad
1 // -*- C -*-
2
3 len = 80;
4 basethick = 4;
5 sidewall = 5;
6 width = 40;
7
8 strapthick = 4;
9 strapwidth = 7;
10
11 strapbotgap = 1;
12 strapsidegap = 4;
13 overstrap = 4;
14
15 wallheight = strapbotgap + strapthick + overstrap;
16
17 availlen = (len - strapsidegap);
18 numstraps = floor(availlen / (strapwidth + strapsidegap));
19 strapstride = availlen / numstraps;
20 echo(numstraps, strapstride);
21
22 module Bracket(){
23   difference(){
24     cube([len, width, basethick+wallheight]);
25     translate([-1, sidewall, basethick])
26       cube([len+2, width-sidewall*2, wallheight+1]);
27     for (i=[0:numstraps-1]) {
28       translate([ (0.5+i)*strapstride + strapsidegap/2,
29                   width/2,
30                   basethick + strapbotgap + strapthick/2 ])
31         cube([strapwidth, width*2, strapthick], center=true);
32     }
33   }
34 }
35
36 Bracket();