define wiring in separate file
[challenge-bot] / 3d-printables / nut-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
10 module nut_2d(size) {
11 side_length = size * sin(30) / sin(120);
12 for (ii = [-1:1]) {
13 rotate(a = 120 * ii, v = [0, 0, 1]) {
14 square([side_length, size], center = true); } } }
15
16 module nut(size, height) {
17 linear_extrude(height = height) {
18 nut_2d(size); } }
19
20 /*
21 This file is part of challenge-bot.
22
23 Challenge-bot is free software: you can redistribute it and/or modify
24 it under the terms of the GNU Affero General Public License as published by
25 the Free Software Foundation, either version 3 of the License, or
26 (at your option) any later version.
27
28 GNU Affero Emacs is distributed in the hope that it will be useful,
29 but WITHOUT ANY WARRANTY; without even the implied warranty of
30 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
31 GNU Affero General Public License for more details.
32
33 You should have received a copy of the GNU Affero General Public License
34 along with challenge-bot. If not, see <http://www.gnu.org/licenses/>.
35 */