chiark / gitweb /
3e39d8dbec7ef36684c3b53981bc987407f984cc
[reprap-play.git] / belt-slot-cut-jig.scad
1 // -*- C -*-
2
3 crewpunch_slop = 0.3;
4
5 holder_min_wall = 1;
6 holder_front_wall = 5;
7
8 // from careful measurement
9
10 crewpunch_shape =
11   [[  6, [0.6, 6.0], [1.6, 12.3] ],
12    [  8, [1.1, 6.2], [1.9, 12.5] ],
13    [ 10, [1.6, 6.5], [2.1, 12.8] ],
14    [ 12, [1.8, 6.6], [2.3, 12.7] ],
15    [ 14, [2.1, 6.8], [2.6, 13.0] ],
16    [ 16, [2.4, 6.9], [2.7, 13.2] ]];
17
18 crewpunch_systematic_size_error = +0.36;
19
20 crewpunch_min_y = 4.7 - crewpunch_systematic_size_error;
21
22 // computed
23
24 crewpunch_smallest_shape = crewpunch_shape[0];
25 crewpunch_biggest_shape = crewpunch_shape[len(crewpunch_shape)-1];
26
27 holder_block_zsz = crewpunch_biggest_shape[0] - crewpunch_smallest_shape[0];
28 holder_xsz = crewpunch_biggest_shape[0][0] + crewpunch_biggest_shape[0][1] +
29   holder_min_wall*2;
30 holder_ysz = crewpunch_biggest_shape[1][0] + crewpunch_biggest_shape[1][1] +
31   holder_min_wall + holder_front_wall;
32
33 // objects
34
35 module CrewPunch(){
36   ourslop = crewpunch_slop - crewpunch_systematic_size_error;
37   hull(){
38     for(layer=crewpunch_shape){
39       translate([0,0, layer[0]]){
40         for(xind=[0,1]) //translate([xind?0:1,0,0])
41           for(yind=[0,1]) //translate([0,yind?0.5:0,0])
42             mirror([xind?1:0,0,0]) mirror([0,yind?0:1,0]){
43               translate([-0.1,-0.1,-0.1])
44                 cube([0.1 + layer[2][xind] + ourslop,
45                       0.1 + layer[1][yind] + ourslop,
46                       0.2]);
47             }
48       }
49     }
50   }
51 }
52
53 module PunchHolder(){
54   difference(){
55     cube([holder_xsz, holder_ysz, holder_block_zsz]);
56     
57   }
58 }
59         
60 //CrewPunch();
61 PunchHolder();