//chasis robot laberinto (90,105,50) //altura tornillo hto=10; //radio tornillo rto=1.7; //altura cabeza tornillo hct=2; //radio cabeza tornillo rct=3; //altura tuerca htu=2.7; //radio tuerca rtu=3.4; //diferencia de encaje D=0.4; chasis(90,70,50,2,10); module chasis(x,y,z,grueso,radio) { difference() { //caja base translate([radio, x/2,0]) union()color("red") { minkowski() { cube([x-2*radio,y-2*radio,z/2], center = false); cylinder(r=radio,h=z/2,$fn=100); } translate([x/2-radio, 0, 0]) cylinder(r=x/2,h=z,$fn=100); } //caja restada translate([radio, x/2, 2*grueso]) color("green") { minkowski() { cube([x-2*radio,y-2*radio,z/2], center = false); cylinder(r=radio-grueso,h=z/2,$fn=100); } } translate([x/2, x/2,2*grueso]) color("green") cylinder(r=x/2-grueso,h=z,$fn=100); //agujero tornillo bola color("Gray") { translate([x/2,x/4,-3])cylinder(h =hto, r=rto,$fn=100); translate([x/2,x/4,4-hct])cylinder(h =hct+1, r=rct,$fn=100); } //agujeros tornillos soporte sensor lateral color("grey") { translate([29,90,-3])cylinder(h =hto, r=rto,$fn=100); translate([29,90,-1])cylinder(h =hct+1, r=rct,$fn=100); translate([29,50,-3])cylinder(h =hto, r=rto,$fn=100); translate([29,50,-1])cylinder(h =hct+1, r=rct,$fn=100); } //agujeros tornillos soporte sensor frontal color("grey") { translate([25,37,-3])cylinder(h =hto, r=rto,$fn=100); translate([25,37,-1])cylinder(h =hct+1, r=rct,$fn=100); translate([65,37,-3])cylinder(h =hto, r=rto,$fn=100); translate([65,37,-1])cylinder(h =hct+1, r=rct,$fn=100); } //agujeros tornillos soporte motor dereccho color("Gray") { translate([37,86.5,-3])cylinder(h =hto, r=rto,$fn=100); translate([37,86.5,4-hct])cylinder(h =hct+1, r=rct,$fn=100); translate([37,58.5,-3])cylinder(h =hto, r=rto,$fn=100); translate([37,58.5,4-hct])cylinder(h =hct+1, r=rct,$fn=100); translate([22,86.5,-3])cylinder(h =hto, r=rto,$fn=100); translate([22,86.5,4-hct])cylinder(h =hct+1, r=rct,$fn=100); translate([22,58.5,-3])cylinder(h =hto, r=rto,$fn=100); translate([22,58.5,4-hct])cylinder(h =hct+1, r=rct,$fn=100); } //agujeros tornillos soporte motor izquierdo color("Gray") { translate([53,86.5,-3])cylinder(h =hto, r=rto,$fn=100); translate([53,86.5,4-hct])cylinder(h =hct+1, r=rct,$fn=100); translate([53,58.5,-3])cylinder(h =hto, r=rto,$fn=100); translate([53,58.5,4-hct])cylinder(h =hct+1, r=rct,$fn=100); translate([68,86.5,-3])cylinder(h =hto, r=rto,$fn=100); translate([68,86.5,4-hct])cylinder(h =hct+1, r=rct,$fn=100); translate([68,58.5,-3])cylinder(h =hto, r=rto,$fn=100); translate([68,58.5,4-hct])cylinder(h =hct+1, r=rct,$fn=100); } //agujero sensor lateral color("blue") translate([-10,45-D,20-D]) cube([20,50+D,24+D], center = false); //agujero sensor frontal color("blue") translate([20-D/2,-5,20-D]) cube([50+D,20,24+D], center = false); //agujero rueda derecha color("orange") translate([grueso,50,-10]) cube([15,45,20], center = false); //agujero rueda izquierda color("orange") translate([73,50,-10]) cube([15,45,20], center = false); //agujero cables translate([x/2-5,93,-3]) union() color("orange") { cube(size = [10,10,10], center = false); translate([10,5,0]) cylinder(h = 10, r=5,$fn=100); translate([0,5,0]) cylinder(h = 10, r=5,$fn=100); } translate([7,38,-3]) union() color("orange") { cube(size = [5,10,10], center = false); translate([5,5,0]) cylinder(h = 10, r=5,$fn=100); translate([0,5,0]) cylinder(h = 10, r=5,$fn=100); } translate([78,38,-3]) union() color("orange") { cube(size = [5,10,10], center = false); translate([5,5,0]) cylinder(h = 10, r=5,$fn=100); translate([0,5,0]) cylinder(h = 10, r=5,$fn=100); } //respiraderos translate([20,100,20]) color("blue") cube(size = [50,10,5], center = false); translate([20,100,30]) color("blue") cube(size = [50,10,5], center = false); translate([20,100,40]) color("blue") cube(size = [50,10,5], center = false); //agujeros tornillos soporte placa color("grey") { translate([61,90,-3])cylinder(h =hto, r=rto,$fn=100); translate([61,90,-1])cylinder(h =hct+1, r=rct,$fn=100); translate([61,50,-3])cylinder(h =hto, r=rto,$fn=100); translate([61,50,-1])cylinder(h =hct+1, r=rct,$fn=100); } } //soportes tapa color("white") { translate([10,30,0]) difference() { cylinder(r=5,h=z,$fn=100); translate([0,0,3*grueso]) cylinder(r=1.5,h=z-2*grueso,$fn=100); } translate([10,100,0]) difference() { cylinder(r=5,h=z,$fn=100); translate([0,0,3*grueso]) cylinder(r=1.5,h=z-2*grueso,$fn=100); } translate([80,30,0]) difference() { cylinder(r=5,h=z,$fn=100); translate([0,0,3*grueso]) cylinder(r=1.5,h=z-2*grueso,$fn=100); } translate([80,100,0]) difference() { cylinder(r=5,h=z,$fn=100); translate([0,0,3*grueso]) cylinder(r=1.5,h=z-2*grueso,$fn=100); } } //palo de sugeccion color("red") translate([x/2-1,0,0]) color("blue") cube(size = [2,2,z], center = false); }