Gesellschaftsspiel-Replikator/Poeppel V1: Unterschied zwischen den Versionen

Aus Stratum 0
Wechseln zu:Navigation, Suche
(Seite angelegt: OpenSCAD für Blindenpöppel)
 
 
(3 dazwischenliegende Versionen von 3 Benutzern werden nicht angezeigt)
Zeile 1: Zeile 1:
<pre>
+
<pre><nowiki>
 
// Blindenpöppel
 
// Blindenpöppel
// Annette Thurow
+
// (c) Stratum 0 e.V.
// 2014-01-21 V1
+
// 2014-04-14 V2.2
 
// License: WTF
 
// License: WTF
  
Hoehe=30;
+
$fn=50;
Teiler=3;
+
 
 +
Hoehe=15;
 +
Teiler=2;
 
Radius1=Hoehe/Teiler;
 
Radius1=Hoehe/Teiler;
RadiusM=Hoehe*(Teiler-1)/Teiler/Teiler;
+
Randdicke=1;
 +
Ringhoehe=3;
 +
 
 +
rotate([180,0,0])
 +
    union()
 +
    {
 +
        difference()
 +
        {
 +
            union()
 +
            {
 +
                // Kegel erzeugen
 +
                color("red") cylinder(Hoehe,Radius1,Radius1 / Teiler);
 +
 
 +
                // Rand auftragen
 +
                color("blue") cylinder(Ringhoehe,Radius1,Radius1);
 +
            }
  
difference()
+
            // Hohlraum abziehen
 +
            color("green") cylinder(Hoehe-1,Radius1-1,Radius1 / Teiler -1);
 +
        }
 +
 
 +
 
 +
        // Randverzierungen: nach Wunsch einkommentieren, oder ganz ohne
 +
       
 +
        // StricheHorizontal(20);
 +
        StricheVertikal(20);
 +
        // QuadratischePunkte(32);
 +
    }
 +
 
 +
 
 +
 
 +
 
 +
// Striche horizontal
 +
 
 +
module StricheHorizontal(n) // Anzahl der Striche rundherum n=20
 +
{
 +
    Strichlaenge = 3;
 +
    for(i = [1:n])
 +
    {
 +
        rotate([0,0,360/n*i])
 +
            translate([Radius1,0,Ringhoehe/2]) 
 +
                cube ([1,Strichlaenge,1], center=true);
 +
    }
 +
} // end module
 +
 
 +
 
 +
 
 +
// Striche vertikal
 +
module StricheVertikal(m) // Anzahl der Striche rundherum m
 
{
 
{
    union()
 
    {
 
          // Kegel erzeugen
 
          color("red") cylinder(Hoehe,Radius1,Radius2);
 
  
          // Rand auftragen
+
    for(j = [1:m])
          color("blue") cylinder(1,Radius1,Radius1);
+
    {
    }
+
        rotate([0,0,360/m*j])
 +
        {
 +
            translate([Radius1,0,0]) cube ([1,1,Ringhoehe], center=false);
 +
    }
 +
}
  
    // Spitze abschneiden
 
    translate([0,0,Hoehe/3])       
 
    color("orange")cylinder(Hoehe,Radius1,Radius2);
 
  
    // Hohlraum abziehen
+
// Quadratische Punkte horizontal
    color("green") cylinder(Hoehe-1,Radius1-1,Radius2);
+
module QuadratischePunkte(o) // Anzahl der Striche rund herum o=32
};
+
{
 +
    Strichlaenge2 = 1;
 +
    for(k = [1:o])
 +
    {
 +
        rotate([0,0,360/o*k])
 +
        {
 +
            translate([Radius1,0,Ringhoehe/2])  cube ([1,Strichlaenge2,1], center=true);
 +
        }
 +
    }
  
// Deckel draufsetzen
+
} // end module
color("black")
 
translate ([0,0,Radius1-1])
 
cylinder(1,RadiusM,RadiusM);
 
  
// Hier Verzierungen auf den Rand anbringen todo
+
}
</pre>
+
</nowiki></pre>

Aktuelle Version vom 14. April 2014, 15:15 Uhr

// Blindenpöppel
// (c) Stratum 0 e.V.
// 2014-04-14 V2.2
// License: WTF

$fn=50;

Hoehe=15;
Teiler=2;
Radius1=Hoehe/Teiler;
Randdicke=1;
Ringhoehe=3;

rotate([180,0,0])
    union()
    {
        difference()
        {
            union()
            {
                // Kegel erzeugen
                color("red") cylinder(Hoehe,Radius1,Radius1 / Teiler);

                // Rand auftragen
                color("blue") cylinder(Ringhoehe,Radius1,Radius1);
            }

            // Hohlraum abziehen
            color("green") cylinder(Hoehe-1,Radius1-1,Radius1 / Teiler -1);
        }
   

        // Randverzierungen: nach Wunsch einkommentieren, oder ganz ohne
        
        // StricheHorizontal(20);
        StricheVertikal(20);
        // QuadratischePunkte(32);
    }




// Striche horizontal

module StricheHorizontal(n) // Anzahl der Striche rundherum n=20
{ 
    Strichlaenge = 3;
    for(i = [1:n]) 
    {
        rotate([0,0,360/n*i])
            translate([Radius1,0,Ringhoehe/2])  
                cube ([1,Strichlaenge,1], center=true);
    }
} // end module



// Striche vertikal
module StricheVertikal(m) // Anzahl der Striche rundherum m
{

    for(j = [1:m]) 
    {
        rotate([0,0,360/m*j])
        {
            translate([Radius1,0,0])  cube ([1,1,Ringhoehe], center=false);
    }
}


// Quadratische Punkte horizontal
module QuadratischePunkte(o) // Anzahl der Striche rund herum o=32
{
    Strichlaenge2 = 1;
    for(k = [1:o]) 
    {
         rotate([0,0,360/o*k])
         {
             translate([Radius1,0,Ringhoehe/2])  cube ([1,Strichlaenge2,1], center=true);
         }
    }

} // end module

}