From: Lulu
+ +// Blindenwürfel +// Annette Thurow +// 2014-01-21 V1 +// License: WTF + +Kante=20; +Ausschnitt=15; +Kerbe=2; +Punktpos=Kante/2-Kerbe; +Punkthoehe=Kerbe; +Punktbasis=2; +Punktspitze=0; +Punktabstand=4; + + +intersection() +{ +sphere (Kante*0.8); +MyDice(); +} + +module MyDice() +{ +CutDice(); +AddPoints(); +} + + +module CutDice() +{ +difference() +{ + // Basiswürfel erstellen + cube([Kante, Kante, Kante], center=true); + + // Ausschnitt für Einkerbungen erstellen + // Seite Z: 1 + + color("red") translate ([0,0,Kante/2]) cube([Ausschnitt, Ausschnitt, Kerbe*2],center=true); + + // Seite -Z: 6 + + color("green") translate ([0,0,-Kante/2]) cube([Ausschnitt, Ausschnitt, Kerbe*2],center=true); + + // Seite Y: 3 + + color("blue")translate ([0,Kante/2,0]) cube([Ausschnitt, Kerbe*2, Ausschnitt],center=true); + + // Seite -Y: 4 + + color("orange")translate ([0,-Kante/2,0]) cube([Ausschnitt, Kerbe*2, Ausschnitt],center=true); + + // Seite X: 2 + + color("magenta")translate ([Kante/2,0,0]) cube([Kerbe*2, Ausschnitt, Ausschnitt],center=true); + + // Seite -X: 5 + + color("cyan") translate ([-Kante/2,0,0]) cube([Kerbe*2, Ausschnitt, Ausschnitt],center=true); + +};// End Difference +}; // End Module + +// Punkte hinzufügen + + +module AddPoints(){ + +// Seite Z: 1 + +color("red") +translate([0,0,Punktpos]) +cylinder(Punkthoehe,Punktbasis,Punktspitze); + +// Seite -Z: 6 + +color("green") +translate([Punktabstand,0,-Punktpos]) +rotate ([0,180,0]) +cylinder(Punkthoehe,Punktbasis,Punktspitze); + +color("green") +translate([-Punktabstand,0,-Punktpos]) +rotate ([0,180,0]) +cylinder(Punkthoehe,Punktbasis,Punktspitze); + +color("green") +translate([Punktabstand,Punktabstand,-Punktpos]) +rotate ([0,180,0]) +cylinder(Punkthoehe,Punktbasis,Punktspitze); + +color("green") +translate([-Punktabstand,Punktabstand,-Punktpos]) +rotate ([0,180,0]) +cylinder(Punkthoehe,Punktbasis,Punktspitze); + +color("green") +translate([Punktabstand,-Punktabstand,-Punktpos]) +rotate ([0,180,0]) +cylinder(Punkthoehe,Punktbasis,Punktspitze); + +color("green") +translate([-Punktabstand,-Punktabstand,-Punktpos]) +rotate ([0,180,0]) +cylinder(Punkthoehe,Punktbasis,Punktspitze); + + +// Seite Y: 3 + +color("blue") +translate([0,Punktpos,0]) +rotate([-90,0,0]) +cylinder(Punkthoehe,Punktbasis,Punktspitze); + +color("blue") +translate([Punktabstand,Punktpos,Punktabstand]) +rotate([-90,0,0]) +cylinder(Punkthoehe,Punktbasis,Punktspitze); + +color("blue") +translate([-Punktabstand,Punktpos,-Punktabstand]) +rotate([-90,0,0]) +cylinder(Punkthoehe,Punktbasis,Punktspitze); + +// Seite -Y: 4 + +color("orange") +translate([Punktabstand,-Punktpos,Punktabstand]) +rotate ([90,0,0]) +cylinder(Punkthoehe,Punktbasis,Punktspitze); + +color("orange") +translate([-Punktabstand,-Punktpos,Punktabstand]) +rotate ([90,0,0]) +cylinder(Punkthoehe,Punktbasis,Punktspitze); + +color("orange") +translate([Punktabstand,-Punktpos,-Punktabstand]) +rotate ([90,0,0]) +cylinder(Punkthoehe,Punktbasis,Punktspitze); + +color("orange") +translate([-Punktabstand,-Punktpos,-Punktabstand]) +rotate ([90,0,0]) +cylinder(Punkthoehe,Punktbasis,Punktspitze); + + +// Seite X: 2 + +color("magenta") +translate([Punktpos,Punktabstand,-Punktabstand]) +rotate([0,90,0]) +cylinder(Punkthoehe,Punktbasis,Punktspitze); + +color("magenta") +translate([Punktpos,-Punktabstand,Punktabstand]) +rotate([0,90,0]) +cylinder(Punkthoehe,Punktbasis,Punktspitze); + +// Seite -X: 5 + +color("cyan") +translate([-Punktpos,0,0]) +rotate([0,-90,0]) +cylinder(Punkthoehe,Punktbasis,Punktspitze); + +color("cyan") +translate([-Punktpos,-Punktabstand,-Punktabstand]) +rotate([0,-90,0]) +cylinder(Punkthoehe,Punktbasis,Punktspitze); + +color("cyan") +translate([-Punktpos,Punktabstand,-Punktabstand]) +rotate([0,-90,0]) +cylinder(Punkthoehe,Punktbasis,Punktspitze); + +color("cyan") +translate([-Punktpos,Punktabstand,Punktabstand]) +rotate([0,-90,0]) +cylinder(Punkthoehe,Punktbasis,Punktspitze); + +color("cyan") +translate([-Punktpos,-Punktabstand,Punktabstand]) +rotate([0,-90,0]) +cylinder(Punkthoehe,Punktbasis,Punktspitze); +} +Seite 2 + +