/* Hacken Open Air */ Materialwartung ist am 29., nicht 19.
[stratum0-wiki.git] / Gesellschaftsspiel-Replikator%2FScrabbleBrett.mw
1
2 [[Datei:Ein Viertel Scrabble-Brett.PNG|thumb|OpenSCAD Entwurf von einem Scrabble-Brett (ein Viertel)]]
3
4 * Andere Anbieter:
5 **[http://www.amazon.com/Maxi-Aids-Tactile-Braille-Crossword-Puzzle-Game/dp/B004USI2H6/ref=pd_sim_t_10?ie=UTF8&refRID=1CRT5HWAZZD53CGR5XT8]
6 ** [http://www.amazon.com/Deluxe-Scrabble-Game-Braille-Version/dp/B000YL1XEM/ref=pd_sim_hpc_7?ie=UTF8&refRID=1ZV6GKYKWP7PTT01XTER]
7
8 <PRE>
9
10
11 // Scrabble Spielbrett
12 // (ein Viertel)
13 // 2014-05-15 V1.2
14 // by Stratum 0
15 // License: WTFPL
16
17 // $fn=20;
18
19 Kante = 14;
20 Kantenbreite = 1;
21 Hoehe = 4;
22 Randhoehe = 2;
23 Abstand=0;
24 Zaehler=1;
25 Viertelfeld=8;
26
27
28
29 //Hauptprogramm
30
31 intersection()
32 {
33 ViertelBrett();
34 cube ([Kante*(Viertelfeld+0.5), Kante*(Viertelfeld+0.5), Kante*(Viertelfeld+0.5)]);
35 }
36
37
38 module ViertelBrett()
39 {
40
41 for (i = [1:Viertelfeld])
42 {
43 for (j = [1:Viertelfeld])
44 {
45 translate([(Kante+Abstand)*i+Abstand,(Kante+Abstand)*j,0])
46 {
47 //Dreifacher Wortwert
48 if ((i==1) && (j==1)) { Feld("red"); Striche(3);}
49 if ((i==1) && (j==8)) { Feld("red"); Striche(3);}
50 if ((i==8) && (j==1)) { Feld("red"); Striche(3);}
51
52 //Doppelter Wortwert
53 if ((i==2) && (j==2)) { Feld("pink"); Striche(2);}
54 if ((i==3) && (j==3)) { Feld("pink"); Striche(2);}
55 if ((i==4) && (j==4)) { Feld("pink"); Striche(2);}
56 if ((i==5) && (j==5)) { Feld("pink"); Striche(2);}
57 if ((i==8) && (j==8)) { Feld("pink"); Striche(2);}
58
59 // Dreifacher Buchstabenwert
60 if ((i==2) && (j==6)) { Feld("blue"); Punkte(3);}
61 if ((i==6) && (j==2)) { Feld("blue"); Punkte(3);}
62 if ((i==6) && (j==6)) { Feld("blue"); Punkte(3);}
63
64 // Doppelter Buchstabenwert
65 if ((i==7) && (j==7)) { Feld("lightblue"); Punkte(2); }
66 if ((i==3) && (j==7)) { Feld("lightblue"); Punkte(2);}
67 if ((i==7) && (j==3)) { Feld("lightblue"); Punkte(2);}
68 if ((i==8) && (j==4)) { Feld("lightblue"); Punkte(2);}
69 if ((i==4) && (j==8)) { Feld("lightblue"); Punkte(2);}
70 if ((i==1) && (j==4)) { Feld("lightblue"); Punkte(2);}
71 if ((i==4) && (j==1)) { Feld("lightblue"); Punkte(2);}
72
73 // ansonsten normales Feld
74 Feld("lightgreen");
75 }
76 } // End For J
77 } // End For I
78
79
80 }
81
82 // Basisfeld erstellen
83 module Feld(Farbe)
84 {
85 difference()
86 {
87 cube([Kante, Kante, Hoehe+Randhoehe], center=false);
88
89 translate ([Kantenbreite,Kantenbreite,Hoehe-Randhoehe])
90 color (Farbe)
91 cube([Kante-Kantenbreite-Kantenbreite, Kante-Kantenbreite-Kantenbreite, Hoehe+Randhoehe], center=false);
92
93 };
94
95 }
96
97 module Punkte(AnzahlPunkte)
98 {
99 if (AnzahlPunkte==2)
100 {
101 translate ([Kante/3, Kante/3, Hoehe-Randhoehe]) cylinder(Randhoehe/2,2,1, center=false);
102 translate ([Kante/3*2, Kante/3*2, Hoehe-Randhoehe]) cylinder(Randhoehe/2,2,1, center=false);
103 }
104 if (AnzahlPunkte==3)
105 {
106 translate ([Kante/4, Kante/4, Hoehe-Randhoehe]) cylinder(Randhoehe/2,2,1, center=false);
107 translate ([Kante/4*2, Kante/4*2, Hoehe-Randhoehe]) cylinder(Randhoehe/2,2,1, center=false);
108 translate ([Kante/4*3, Kante/4*3, Hoehe-Randhoehe]) cylinder(Randhoehe/2,2,1, center=false);
109 }
110 }
111
112
113
114 module Striche(AnzahlStriche)
115 {
116 if (AnzahlStriche==2)
117 {
118 translate ([Kante/3-Kantenbreite/2, Kante/4, Hoehe-Randhoehe]) cube([Randhoehe/2,Kante/2,Randhoehe/2]);
119 translate ([Kante/3*2-Kantenbreite/2, Kante/4, Hoehe-Randhoehe]) cube([Randhoehe/2,Kante/2,Randhoehe/2]);
120 }
121 if (AnzahlStriche==3)
122 {
123 translate ([Kante/4, Kante/4, Hoehe-Randhoehe]) cube([Randhoehe/2,Kante/2,Randhoehe/2]);
124 translate ([Kante/4*2, Kante/4, Hoehe-Randhoehe]) cube([Randhoehe/2,Kante/2,Randhoehe/2]);
125 translate ([Kante/4*3, Kante/4, Hoehe-Randhoehe]) cube([Randhoehe/2,Kante/2,Randhoehe/2]);
126 }
127 }
128
129
130
131
132 </PRE>
This page took 0.054443 seconds and 5 git commands to generate.