chiark / gitweb /
flyscreen-handle: wip straps
[reprap-play.git] / belt-hole-cut-jig-simple.scad
1 // -*- C -*-
2
3 strap_thick = 3;
4 strap_width = 26.75 + 0.7;
5
6 punch_dia = 11.10;
7
8 punch_slop = 0.5;
9
10 jig_interval = 20;
11
12 reg_blocks = 3;
13
14 jig_iters = 7;
15
16 roof_thick = 4;
17 regblock_thick = 4;
18 punchtube_thick = 1.8;
19
20 total_h = 33;
21 punchfree_h = 8;
22
23 reg_prot_width = 4;
24
25 // computed:
26
27 punchhole_r = punch_dia/2 + punch_slop;
28 mainframe_l = jig_interval * jig_iters;
29
30 mainframe_w = strap_width + reg_prot_width*2;
31
32 echo(mainframe_l);
33
34 module RegBlockOutline(){
35   difference(){
36     translate([0, -mainframe_w/2])
37       mirror([1,0])
38       square([total_h, mainframe_w]);
39     translate([1, -strap_width/2])
40       mirror([1,0])
41       square([strap_thick+1, strap_width]);
42   }
43 }
44
45 module RegBlock(){
46   translate([regblock_thick/2,0,total_h])
47     rotate([0,-90,0])
48     linear_extrude(height=regblock_thick)
49     RegBlockOutline();
50 }
51
52 module MainFrame(){
53   translate([jig_interval/2, -mainframe_w/2, 0])
54     mirror([1,0,0])
55     cube([mainframe_l, mainframe_w, roof_thick]);
56   for (rbi=[0:reg_blocks-1]) {
57     translate([0 +
58                -(mainframe_l-jig_interval)/(reg_blocks-1) * rbi,
59                0,0])
60       RegBlock();
61   }
62 }
63
64 module PerHole(){
65   for (holei=[0:jig_iters-1]) {
66     translate([-jig_interval * holei, 0, 0])
67       child(0);
68   }
69 }
70
71 module Shells(){
72   PerHole(){
73     cylinder(r=punchhole_r+punchtube_thick, h=total_h-punchfree_h, $fn=50);
74   }
75 }
76
77 module Punches(){
78   PerHole(){
79     translate([0,0,-1]){
80       cylinder(r=punchhole_r, h=total_h+2, $fn=100);
81       %cylinder(r=punch_dia/2, h=total_h);
82     }
83   }
84 }
85
86 module Jig(){
87   difference(){
88     union(){
89       MainFrame();
90       Shells();
91     }
92     Punches();
93   }
94 }
95
96 Jig();