-
Notifications
You must be signed in to change notification settings - Fork 0
/
oshw-logo.scad
41 lines (36 loc) · 1.07 KB
/
oshw-logo.scad
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
// OSHW Logo Generator
// Open Source Hardware Logo : http://oshwlogo.com/
// -------------------------------------------------
//
// Adapted from Adrew Plumb/ClothBot original version
// just change internal parameters to made dimension control easier
// a single parameter : logo diameter (millimeters)
//
// oshw_logo_2D(diameter) generate a 2D logo with diameter requested
// just have to extrude to get a 3D version, then add it to your objects
//
// cc-by-sa, pierre-alain dorange, july 2012
module gear_tooth_2d(d) {
polygon( points=[
[0.0,10.0*d/72.0], [0.5*d,d/15.0],
[0.5*d,-d/15.0], [0.0,-10.0*d/72.0] ] );
}
module oshw_logo_2d(d=10.0) {
rotate(-135) {
difference() {
union() {
circle(r=14.0*d/36.0,$fn=20);
for(i=[1:7]) assign(rotAngle=45*i+45)
rotate(rotAngle) gear_tooth_2d(d);
}
circle(r=10.0*d/72.0,$fn=20);
intersection() {
rotate(-20) square(size=[10.0*d/18.0,10.0*d/18.0]);
rotate(20) square(size=[10.0*d/18.0,10.0*d/18.0]);
}
}
}
}
// usage : oshw_logo_2d(diameter)
linear_extrude(height=2)
oshw_logo_2d(25);