forked from nophead/NopSCADlib
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpolyholes.scad
More file actions
77 lines (67 loc) · 2.11 KB
/
polyholes.scad
File metadata and controls
77 lines (67 loc) · 2.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
//
// NopSCADlib Copyright Chris Palmer 2018
// nop.head@gmail.com
// hydraraptor.blogspot.com
//
// This file is part of NopSCADlib.
//
// NopSCADlib is free software: you can redistribute it and/or modify it under the terms of the
// GNU General Public License as published by the Free Software Foundation, either version 3 of
// the License, or (at your option) any later version.
//
// NopSCADlib is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
// without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along with NopSCADlib.
// If not, see <https://www.gnu.org/licenses/>.
//
include <../utils/core/core.scad>
use <../vitamins/rod.scad>
include <../vitamins/sheets.scad>
module polyholes() {
module positions()
for(i = [1 : 10]) {
translate([(i * i + i) / 2 + 3 * i , 8])
let($r = i / 2)
children();
let(d = i + 0.5)
translate([(d * d + d) / 2 + 3 * d, 19])
let($r = d / 2)
children();
}
color(pp1_colour) linear_extrude(height = 3, center = true)
difference() {
square([100, 27]);
positions()
poly_circle(r = $r);
}
positions()
rod(d = 2 * $r, l = 8 * $r + 5);
//
// Poly rings
//
ir = 3 / 2;
cir = corrected_radius(ir);
sizes = [1.5, 2, 3, 4];
for(i = [0 : len(sizes) - 1])
translate([i * 10, -10]) {
color(pp1_colour)
poly_tube(ir = ir, or = cir + sizes[i] * extrusion_width, h = 1);
rod(2 * ir, 3);
}
//
// Drill and slot
//
sheet = Steel06;
translate([10, -30])
render_2D_sheet(sheet)
difference() {
sheet_2D(sheet, 20, 20, 1);
translate([0, 5])
slot(1.5, 6, 0);
translate([0, -5])
drill(2, 0);
}
}
polyholes();