// Siranee Nuchitprasitchai // updated Oct30,2016 // for screw thread use //-----cone CylinderHeight=150; // outside baseCylinderOutside = 60; topCylinderOutside = 17.5; // inside baseCylinderInside = baseCylinderOutside-5; topCylinderInside = topCylinderOutside-2; // triangle face=3; firstCylinderHeight=50; secondCylinderHeight=40; lastCylinderHeight=60; //--------- /* //---screw threads length=20; pitch=3; pitchRadius=17.5; cylinderR=15; //-----end crew threads */ //----last cylinder // inside lastCylinderOutR=baseCylinderOutside; lastCylinderOutH=lastCylinderHeight; // inside lastCylinderInR=baseCylinderInside; lastCylinderInH= lastCylinderHeight; //-----end last cylinder // ----belt beltHeight=10; holewidth=3; holethick=5; holehight=7; distancebetweenhole=25; //---- //----holder holderCylinderOutR=17.5; holderCylinderOutH=15; holderCylinderInR=10; holderCylinderInH=10; holderCylinderbottomR=5; holderCylinderbottomH=5; barwidth=10; //--------- /* //---screw threads translate([0,0,lastCylinderHeight+secondCylinderHeight+firstCylinderHeight]) difference(){ trapezoidThread( length=length/3, // axial length of the threaded rod pitch=pitch, // axial distance from crest to crest pitchRadius=pitchRadius, // radial distance from center to mid-profile threadHeightToPitch=0.5, // ratio between the height of the profile and the pitch // std value for Acme or metric lead screw is 0.5 profileRatio=0.5, // ratio between the lengths of the raised part of the profile and the pitch // std value for Acme or metric lead screw is 0.5 threadAngle=30, // angle between the two faces of the thread // std value for Acme is 29 or for metric lead screw is 30 RH=true, // true/false the thread winds clockwise looking along shaft, i.e.follows the Right Hand Rule clearance=0.1, // radial clearance, normalized to thread height backlash=0.1, // axial clearance, normalized to pitch stepsPerTurn=24 // number of slices to create per turn ); cylinder(r=cylinderR,h=length); } //----end crew threads //-- cylinder straight //scale([1.2,1.5,1]) translate([0,0,lastCylinderHeight+secondCylinderHeight]) difference (){ // outside cylinder(r=pitchRadius,h=firstCylinderHeight); // inside cylinder(r=cylinderR,h=firstCylinderHeight); } //------end c //---cone translate([0,0,lastCylinderHeight]) // scale([1.2,2,1]) difference (){ // outside cylinder(r1=baseCylinderOutside, r2=topCylinderOutside,h=secondCylinderHeight); // inside cylinder(r1=baseCylinderInside, r2=topCylinderInside,h=secondCylinderHeight); } // last cylinder degree= (360*distancebetweenhole)/(2*3.141592653589793238*((lastCylinderOutR+lastCylinderInR)/2)); difference (){ // outside cylinder(r=lastCylinderOutR,h=lastCylinderOutH); // inside cylinder(r=lastCylinderInR,h=lastCylinderInH); // Holes rotate ([0,0,2*degree]) translate([(lastCylinderOutR+lastCylinderInR)/2,0,beltHeight]) cube([holethick,holewidth,holehight]); rotate ([0,0,degree]) translate([(lastCylinderOutR+lastCylinderInR)/2,0,beltHeight]) cube([holethick,holewidth,holehight]); } */ // bottom holder //---screw threads //translate([0,0,lastCylinderHeight+secondCylinderHeight+firstCylinderHeight]) //---screw threads length1=holderCylinderOutH; pitch1=3; pitchRadius1=56; //lastCylinderOutH; cylinderR1=pitchRadius1-5; //lastCylinderInH; //-----end crew threads translate([0,0,holderCylinderOutH])rotate([180,0,0]) union(){ difference(){ trapezoidThread( length=length1-1.7782, // axial length of the threaded rod pitch=pitch1, // axial distance from crest to crest pitchRadius=pitchRadius1, // radial distance from center to mid-profile threadHeightToPitch=0.5, // ratio between the height of the profile and the pitch // std value for Acme or metric lead screw is 0.5 profileRatio=0.5, // ratio between the lengths of the raised part of the profile and the pitch // std value for Acme or metric lead screw is 0.5 threadAngle=30, // angle between the two faces of the thread // std value for Acme is 29 or for metric lead screw is 30 RH=true, // true/false the thread winds clockwise looking along shaft, i.e.follows the Right Hand Rule clearance=0.1, // radial clearance, normalized to thread height backlash=0.1, // axial clearance, normalized to pitch stepsPerTurn=24 // number of slices to create per turn ); cylinder(r=cylinderR1,h=length1); } //----end crew threads difference(){ // outside cylinder(r=holderCylinderOutR,h=holderCylinderOutH); // inside cylinder(r=holderCylinderbottomR*2.5,h=holderCylinderOutH); // inside bigger cylinder(r=holderCylinderbottomR*3,h=holderCylinderOutH/2); } difference(){ union(){ translate([0,0,holderCylinderOutH/2]) cube([barwidth,((cylinderR1)*2),holderCylinderOutH],true); rotate ([0,0,90 ]) translate([0,0,holderCylinderOutH/2]) cube([barwidth,((cylinderR1)*2),holderCylinderOutH],true); } cylinder(r=holderCylinderOutR,h=holderCylinderOutH); } }