add wire-jig for cutting wires the right lengths
[challenge-bot] / 3d-printables / wire-jig.scad
1 // challenge-bot
2 // GNU AGPLv3 (or later at your option)
3 // project available at these locations:
4 // https://gitorious.org/ozzloy/challenge-bot
5 // https://github.com/waynegramlich/challenge-bot
6
7 $fn = 20;
8
9 wire_channel_width = 6;
10 wire_channel_height = 6;
11
12 wire_diameter_measured = 1.17;
13 wire_diameter_fudge = 0.5;
14 wire_diameter = wire_diameter_measured + wire_diameter_fudge;
15 wire_radius = wire_diameter / 2;
16
17 wire_lengths = [10, //strip wire this much
18 35, //short breadboard wire
19 63, //ground to ground
20 120, //arduino breadboard wire
21 180 //motor wire
22 ];
23
24 module wire_channel_groove_2d(width, height, wire_radius) {
25 difference() {
26 square([width, height]);
27 translate([width / 2, height]) {
28 circle(r = wire_radius); } } }
29
30
31 module wire_channel_groove(width, height, wire_radius, length){
32 rotate(a = 90, v = [1, 0, 0]){
33 linear_extrude(height = length){
34 wire_channel_groove_2d(width, height, wire_radius); } } }
35
36 for(ii = [0:len(wire_lengths) - 1]) {
37 translate([wire_channel_width * ii, 0, 0]) {
38 wire_channel_groove(wire_channel_width,
39 wire_channel_height,
40 wire_radius,
41 wire_lengths[ii]); } }