Operácie

OpenSCAD príklady: Rozdiel medzi revíziami

Zo stránky SensorWiki

Balogh (diskusia | príspevky)
Vytvorená stránka „translate([0,0,0]) stlpik(10); translate([10,0,0]) stlpik(20); translate([20,0,0]) stlpik(30); module stlpik(length=10) { $fn=64; difference() { cylinder(…“
 
Balogh (diskusia | príspevky)
 
(3 medziľahlé úpravy od rovnakého používateľa nie sú zobrazené.)
Riadok 1: Riadok 1:
== Dištančné stĺpiky ==
{| width="100%"
|
| <source lang="C++">
translate([0,0,0])
translate([0,0,0])
   stlpik(10);
   stlpik(10);
Riadok 19: Riadok 25:
  }     
  }     
}
}
  </source>
| [[Súbor:OpenSCAD-Example1.png|thumb|Dištančné stĺpiky.]]
|}
== Držiak LED ==
{| width="100%"
|
| <source lang="C++">
$fn=48;
difference()
{
  cylinder(r=3,h=20);
  {
  translate([2.54/2,0,0])
    cylinder(r=0.2,h=21); 
  translate([-2.54/2,0,0])
    cylinder(r=0.2,h=21);
  translate([0,0,18])
    cylinder(r=2.5,h=3);   
     
  }   
     
}
  </source>
| [[Súbor:OpenSCAD-Example2.png|thumb|Držiak LED.]]
|}
== Minca do vozíka ==
{| width="100%"
|
| <source lang="C++">
font = "Impact";
letter_size = 22;
letter_height = 1;
union()
{
difference() { // This builds the coin with recesses on each side.
  cylinder(h=6, d=36);
  translate ([0,0,-5.5]) {  // making bottom brim
        color("red") cylinder(h=6, d=31);  // bottom of coin
        }
  translate ([0,0,5.5]) {
        color("blue") cylinder(h=6, d=31);  // top of coin
        }
    }
rotate([0,0,-90])
{
  union() {  // This union creates and positions the K symbol on the bottom of the coin.
    color("cyan")
    linear_extrude(height = letter_height) {
    rotate([0,0,90]) translate ([0,0,5]) text("K", font=font, valign="center", halign="center", size =letter_size);
            }
        }  // Union - kama bottom
    }
rotate([0,0,90]) {
  translate([0,0,5]) {
  mirror([0,90,0]) {
  union() {  // This union creates and positions the K symbol on the top of the coin.
  color("green")
  linear_extrude(height = letter_height) {
    rotate([0,0,90]) translate ([0,0,5]) text("K", font=font, valign="center", halign="center", size =letter_size);
                    }
                }  // Union - kama top
            }
        }
    }
}
  </source>
| [[Súbor:OpenSCAD-Example3.png|thumb|Minca do vozíka.]]
|}
[[Category:OpenSCAD]] [[Category:DTV]] [[Category:NAVEZ]]

Aktuálna revízia z 23:58, 11. marec 2019

Dištančné stĺpiky

translate([0,0,0])
  stlpik(10);

translate([10,0,0])
  stlpik(20);

translate([20,0,0])
  stlpik(30);


module stlpik(length=10)
{
 $fn=64;
 difference()
 {
  cylinder(d=6, h=length);
  translate([0,0,-1])
   cylinder(d=3.2,h=length+2);
 }    
}
Dištančné stĺpiky.


Držiak LED

$fn=48;

difference()
{
  cylinder(r=3,h=20);
  {
  translate([2.54/2,0,0]) 
     cylinder(r=0.2,h=21);  
  translate([-2.54/2,0,0]) 
     cylinder(r=0.2,h=21); 
  translate([0,0,18])
     cylinder(r=2.5,h=3);    
      
  }     
      
}
Držiak LED.


Minca do vozíka

font = "Impact";

letter_size = 22;
letter_height = 1;

union() 
{
 difference() { // This builds the coin with recesses on each side.
  cylinder(h=6, d=36);
  translate ([0,0,-5.5]) {   // making bottom brim 
        color("red") cylinder(h=6, d=31);   // bottom of coin
        }
  translate ([0,0,5.5]) {
        color("blue") cylinder(h=6, d=31);  // top of coin
        }
    }

 rotate([0,0,-90]) 
 { 
   union() {   // This union creates and positions the K symbol on the bottom of the coin.
    color("cyan") 
    linear_extrude(height = letter_height) {
    rotate([0,0,90]) translate ([0,0,5]) text("K", font=font, valign="center", halign="center", size =letter_size);
            }
        }  // Union - kama bottom
    }

 rotate([0,0,90]) {
   translate([0,0,5]) {
   mirror([0,90,0]) { 
   union() {   // This union creates and positions the K symbol on the top of the coin.
   color("green") 
   linear_extrude(height = letter_height) {
     rotate([0,0,90]) translate ([0,0,5]) text("K", font=font, valign="center", halign="center", size =letter_size);
                    }
                }  // Union - kama top
            }
        }
    }
}
Minca do vozíka.