//Disable $fn and $fa, do not change these $fn=0; $fa=0.01; $fs=0.5; motorthrow=61; bearingdistance=80; //basey=motorthrow+bearingdistance; baset=2; basemidx=28; basecornery=8; basecornert=8; basecornerfromtop=3; basecornerfromside=5; basey=150+basecornery*2; raild=3.3; boltd=3; motorshift=52; motorsupportd=6; motorsupporth=10; motorholed=2; motorholeh=10; module motorbase(sd,sh) { translate([14,-1,0])cube([5,12,baset]); cylinder(d=sd,h=sh); translate([0.5,10,0])cylinder(d=sd,h=sh); translate([-5-0.5,10,0])cylinder(d=sd,h=sh); translate([-57,0,0])cylinder(d=sd,h=sh); translate([-57-5-0.5,0,0])cylinder(d=sd,h=sh); } module motorbasemaker() { union() { difference() { union() { cube([basemidx,basey,baset]); translate([0,baset,baset])cube([basemidx,basecornery,basecornert]); translate([0,baset+basecornery,baset])cube([basecornert,basecornery,basecornert]); translate([0,baset,baset+basecornery])cube([basecornert,basecornery,basecornert]); translate([basemidx-8+1.5,basey-motorshift,0])rotate([0,0,90])motorbase(motorsupportd,motorsupporth); } translate([basemidx-8+1.5,basey-motorshift,0])rotate([0,0,90])motorbase(motorholed,motorholeh); // chamfer rotate([45,0,0])cube([basemidx,1.4*baset,1.4*baset]); translate([0,basey,0])rotate([45,0,0])cube([basemidx,1.4*baset,1.4*baset]); // hole to hold together translate([basemidx/2,basey-baset-basecornery/2,0])cylinder(h=baset+basecornery,d=boltd); translate([basemidx/2,baset+basecornery,baset+basecornery/2])rotate([90,0,0])cylinder(h=baset+basecornery,d=boltd); // rail holes translate([basecornerfromtop,basecornerfromside+baset,basecornery])cylinder(d=raild,h=basecornery+baset); translate([basecornerfromtop,2*basecornery+baset,basecornerfromside+baset])rotate([90,0,0])cylinder(d=raild,h=basecornery+baset); } } } module oneside() { motorbasemaker(); } //oneside(); //translate([0,0,basey])rotate([-90,0,0]) oneside(); bearingd=7.0; bearingwidth=50; bearingx=bearingwidth; bearingy=10+2.5+2-0.75; bearingz=9; bearingplatey=2; bearingplatex=12; bearingplatez=18+1.5; bearingplatescrewx=2.75+0.15; bearingplatescrewd=2.5; bearingraildepthy=bearingy; bearingrailholedepthy=bearingy-2; bearingrailx=6; bearingrailz=9; module bearing() { difference() { union() // block and plate { cube([bearingx,bearingy,bearingz]); translate([(bearingx-bearingplatex)/2,bearingy-bearingplatey,-bearingplatez])cube([bearingplatex,bearingplatey,bearingplatez]); // ears to hold rails translate([0,bearingy-bearingraildepthy,bearingz])cube([bearingrailx,bearingraildepthy,bearingrailz]); translate([bearingx-bearingrailx,bearingy-bearingraildepthy,bearingz])cube([bearingrailx,bearingraildepthy,bearingrailz]); } // bearing slot translate([0,bearingd/2-1,bearingz/2])rotate([0,90,0])cylinder(h=bearingwidth,d=bearingd); // holes for rails translate([bearingx-bearingrailx/2,bearingy,bearingz+raild/2+0.5]) rotate([90,0,0])cylinder(h=bearingrailholedepthy,d=raild); translate([bearingx-bearingrailx/2,bearingy,bearingz+raild/2+raild+1.5]) rotate([90,0,0])cylinder(h=bearingrailholedepthy,d=raild); translate([bearingrailx/2,bearingy,bearingz+raild/2+0.5]) rotate([90,0,0])cylinder(h=bearingrailholedepthy,d=raild); translate([bearingrailx/2,bearingy,bearingz+raild/2+raild+1.5]) rotate([90,0,0])cylinder(h=bearingrailholedepthy,d=raild); // plate screw 1 translate([(bearingx-bearingplatex)/2+bearingplatescrewx,bearingy,-bearingplatez+4.5])rotate([90,0,0])cylinder(h=bearingplatey,d=bearingplatescrewd); // plate screw 2 translate([(bearingx+bearingplatex)/2-bearingplatescrewx,bearingy,-bearingplatez+4.5])rotate([90,0,0])cylinder(h=bearingplatey,d=bearingplatescrewd); } } //bearing(); platex=53; platey=53; platez=5; platebearingx=25; platebearingy=7; platebearingz=9; plateshift=2+raild; raildifference=bearingx-bearingrailx; // 50 6=44 // = platex-platebearingz module plate() { difference() { union() { cube([platex,platey,platez]); translate([(platex-platebearingx)/2,0,-platebearingy-plateshift])cube([platebearingx,platebearingz,platebearingy+plateshift]); translate([(platex-platebearingx)/2,platey-platebearingz,-platebearingy-plateshift])cube([platebearingx,platebearingz,platebearingy+plateshift]); translate([0,(platey-platebearingx)/2,-platebearingy])cube([platebearingz,platebearingx,platebearingy]); translate([platex-platebearingz,(platey-platebearingx)/2,-platebearingy])cube([platebearingz,platebearingx,platebearingy]); } translate([(platex-platebearingx)/2,platebearingz/2,-platebearingy/2-1-plateshift])rotate([0,90,0])cylinder(h=platebearingx,d=bearingd); translate([(platex-platebearingx)/2,platey-platebearingz/2,-platebearingy/2-1-plateshift])rotate([0,90,0])cylinder(h=platebearingx,d=bearingd); translate([platebearingz/2,platebearingx+(platey-platebearingx)/2,-platebearingy/2-1])rotate([90,0,0])cylinder(h=platebearingx,d=bearingd); translate([platex-platebearingz+platebearingz/2,platebearingx+(platey-platebearingx)/2,-platebearingy/2-1])rotate([90,0,0])cylinder(h=platebearingx,d=bearingd); } } plate();