OpensCad

De BrapciWiki
Revisão de 15h03min de 13 de novembro de 2025 por Rene.gabriel (discussão | contribs) (→‎Redondo)
(dif) ← Edição anterior | Revisão atual (dif) | Versão posterior → (dif)
Ir para navegação Ir para pesquisar

[1]

Arquivo:Resumo comandos OpensCad
Resumo comandos OpensCad

Principais Formas

Esfera

$raio = 10;
$diametro;
$fn = 200; // Resolução
sphere(r=$raio);
sphere(d=$diametro);

Cilindro

Cilindro Tubo

$altura = 10;
$raio = 20;
cylinder(h=$altura, r=$raio);

Cilindro Cone

$altura = 10;
$raioSuperior = 20;
$raioInferior = 60;
cylinder(h=$altura, r1=$raioSuperior, r2=$raioInferior);

Cubo

$altura = 20;
$largura = 20;
$profundidade = 20;
cube([$largura, $profundidade, $altura]);


Movimento - Translate

 $x = 10;
 $y = 10;
 $h = 20;
 translate([$x,$y,$h]) cube([25,25,25]);

Rotação - Rotate

 rotate([$x,$y,$h]) cube([25,25,25]);

Texto

text("BRAPCI", size=4, 
  font="Bitstream Vera Sans",
  halign="center"
  valign="center"
  );

Extrusão

rotate([90,0,0])
translate([20,5,0])
  linear_extrude(height=3,
       $fn = 400, // Resolução
       center = true,
       twist, 
       slices = 20,
       convexity = 10)
  text("BRAPCI", size=4, 
  font="Bitstream Vera Sans",
  halign="center",
  xvalign="center"
  );

União

union(){
   $fn = 200;
   translate([8,-2,0]) cube([2,4,6]);
   translate([10,0,0]) sphere(2);
}

Vazamento (NAND)

difference(){
   $fn = 200;
   translate([8,-2,0]) cube([2,4,6]);
   translate([10,0,0]) sphere(2);
}

Interseção (XOR)

intersection(){
   $fn = 200;
   translate([8,-2,0]) cube([2,4,6]);
   translate([10,0,0]) sphere(2);
}

Arcos

Plano

rotate_extrude(angle=270)
{
        translate([20,0,0])
        square(5);
}

Redondo

rotate_extrude(angle=$t*180)
    {
        translate([20,0,0])
        cicle([5,10])
    }

Loop For=

for(i=[0:45:[60-1])
   {
   }