define wiring in separate file
[challenge-bot] / 3d-printables / wire-jig-data.scad
1 /*
2 Copyright (C) 2015 Daniel Watson
3 See the end of the file for license conditions.
4 */
5 // challenge-bot
6 // GNU AGPLv3 (or later at your option)
7 // project available here:
8 // https://challenge-bot.com/
9 $fn = 20;
10
11 include <nut-data.scad>
12 wire_channel_width = 14;
13 wire_channel_height = 14;
14
15 wire_diameter_measured = 1.17;
16 // some of this fudge is due to using a hexagon instead of a circle
17 wire_diameter_fudge = 1.4;
18 wire_diameter = wire_diameter_measured + wire_diameter_fudge;
19 wire_radius = wire_diameter / 2;
20
21 wire_lengths = [10, //strip wire this much
22 35, //short breadboard wire
23 55, //ground to ground
24 120, //arduino breadboard wire
25 180 //motor wire
26 ];
27
28 module wire_channel_groove_2d(width, height, wire_radius) {
29 difference() {
30 square([width, height]);
31 translate([width / 2, height / 2]) {
32 rotate(a = 90, v = [0, 0, 1]) {
33 nut_2d(wire_diameter); } } } }
34
35 module wire_channel_groove(width, height, wire_radius, length) {
36 rotate(a = 90, v = [1, 0, 0]) {
37 linear_extrude(height = length) {
38 wire_channel_groove_2d(width, height, wire_radius); } } }
39
40 /*
41 This file is part of challenge-bot.
42
43 Challenge-bot is free software: you can redistribute it and/or modify
44 it under the terms of the GNU Affero General Public License as published by
45 the Free Software Foundation, either version 3 of the License, or
46 (at your option) any later version.
47
48 GNU Affero Emacs is distributed in the hope that it will be useful,
49 but WITHOUT ANY WARRANTY; without even the implied warranty of
50 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
51 GNU Affero General Public License for more details.
52
53 You should have received a copy of the GNU Affero General Public License
54 along with challenge-bot. If not, see <http://www.gnu.org/licenses/>.
55 */