// Siranee Nuchitprasitchai // updated Oct30,2016 // for screw thread use // outside baseCylinderOutside = 60; topCylinderOutside = 17.5; // inside baseCylinderInside = baseCylinderOutside-5; topCylinderInside = topCylinderOutside-2; // triangle face=3; firstCylinderHeight=50; // straight secondCylinderHeight=40; // cone lastCylinderHeight=100; // big cylinder // old version 60 //--------- //-----cone //----last cylinder // inside lastCylinderOutR=baseCylinderOutside; lastCylinderOutH=lastCylinderHeight; // inside lastCylinderInR=baseCylinderInside; lastCylinderInH= lastCylinderHeight; //-----end last cylinder // ----belt beltHeight=10; // old version 10 holewidth=3; holethick=20; holehight=7; distancebetweenhole=50; //---- //----holder holderCylinderOutR=15; holderCylinderOutH=15; holderCylinderInR=10; holderCylinderInH=10; holderCylinderbottomR=5; holderCylinderbottomH=5; barwidth=10; //---screw threads length=10; // old value 10 pitch=3; pitchRadius=17.5; cylinderR=15; CylinderHeight=firstCylinderHeight+secondCylinderHeight+lastCylinderHeight; //-----end crew threads //---screw threads translate([0,0,CylinderHeight]) difference(){ trapezoidThread( length=length, // 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+5); } //----end crew threads //-- cylinder straight //scale([1.2,1.5,1]) translate([0,0,CylinderHeight-firstCylinderHeight]) difference (){ // outside cylinder(r=pitchRadius,h=firstCylinderHeight); // inside cylinder(r=cylinderR,h=firstCylinderHeight); } //------end cone //---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); } degree= (360*distancebetweenhole)/(2*3.141592653589793238*((lastCylinderOutR+lastCylinderInR)/2)); // library screw length1=lastCylinderHeight+10; // old version 60 pitch1=3; pitchRadius1=57.5; //lastCylinderOutH; cylinderR1=pitchRadius1-5; //lastCylinderInH; //-----end crew threads // library screw libraryscrewOutR = 105; libraryscrewOutH = 25; libraryscrewInR=60; //---- //-------- difference(){ // last cylinder difference (){ // outside cylinder(r=lastCylinderOutR,h=lastCylinderOutH); // inside cylinder(r=lastCylinderInR,h=lastCylinderInH); } //screw translate ([0,0,-10]) difference(){ trapezoidThread( length=length1, // 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); } // Holes rotate ([0,0,2*degree]) translate([(lastCylinderOutR+lastCylinderInR)/2,0,beltHeight+holehight/2]) cube([holethick,holewidth,holehight],true); rotate ([0,0,degree]) translate([(lastCylinderOutR+lastCylinderInR)/2,0,beltHeight+holehight/2]) cube([holethick,holewidth,holehight],true); }