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