jetzt auch mit Randverzierungen
[stratum0-wiki.git] / Gesellschaftsspiel-Replikator%2FPoeppel_V1.mw
1 <pre><nowiki>
2 // Blindenpöppel
3 // Stratum 0
4 // 2014-01-21 V1.5
5 // License: WTF
6
7 $fn=50;
8
9 Hoehe=30;
10 Teiler=3;
11 Radius1=Hoehe/Teiler;
12 RadiusM=Hoehe*(Teiler-1)/Teiler/Teiler;
13
14 // Randverzierungen als Kindelemente übergeben
15 module randverzierung(n = 12) {
16 for(i = [1:n]) {
17 rotate([0,0,i*(360/n)])
18 translate([Radius1+0.1,0,0.5])
19 child();
20 }
21 }
22
23 difference()
24 {
25 union()
26 {
27 // Kegel erzeugen
28 color("red") cylinder(Hoehe,Radius1,Radius2);
29
30 // Rand auftragen
31 color("blue") cylinder(1,Radius1,Radius1);
32 }
33
34 // Spitze abschneiden
35 translate([0,0,Hoehe/3])
36 color("orange")cylinder(Hoehe,Radius1,Radius2);
37
38 // Hohlraum abziehen
39 color("green") cylinder(Hoehe-1,Radius1-1,Radius2);
40 };
41
42 // Deckel draufsetzen
43 color("black")
44 translate ([0,0,Radius1-1])
45 cylinder(1,RadiusM,RadiusM);
46
47 // Randverzierungen: nach Wunsch einkommentieren, oder ganz ohne
48
49 // Kegel:
50 //randverzierung(n=4) {
51 // rotate([0,90,0])
52 // cylinder(r1=0.5, r2=0, h=0.5, center=true);
53 //}
54
55 // Striche hochkant:
56 //randverzierung(n=5) {
57 // rotate([0,90,0])
58 // cube([1,0.5,0.5], center=true);
59 //}
60
61 // Striche quer:
62 //randverzierung(n=9) {
63 // cube([0.5,2,0.5], center=true);
64 //}
65
66 // Pyramiden:
67 //randverzierung(n=11) {
68 // rotate([0,90,0])
69 // cylinder(r1=0.5, r2=0, h=0.4, center=true, $fn=4);
70 //}
71
72 // Plusse:
73 //randverzierung(n=12) {
74 // rotate([0,90,0]) {
75 // cube([1,0.3,0.5], center=true);
76 // cube([0.3,1,0.5], center=true);
77 // }
78 //}
79 </nowiki></pre>
This page took 0.0514 seconds and 5 git commands to generate.