OSE CircularKnitic v18.03: Difference between revisions
Jump to navigation
Jump to search
(Added a Category to the Page) |
|||
(270 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
=Basics= | =Basics= | ||
* OSE's Fork of [[CircularKnitic Parametric|CircularKnitic]] | * OSE's Fork of [[CircularKnitic Parametric|CircularKnitic]], the open source circulate knitting machine | ||
* Code available on GitHub https://github.com/OpenSourceEcology/circular_knitic | |||
* Test build - original size - [[User:Dorkmo/Builds/CircularKnitic]] | |||
* Test build - sock size - [[User:Dorkmo/Builds/CircularKnitic-Sock]] | |||
=Goals= | ==Goals== | ||
==Needle Accomidation== | ===Needle Accomidation=== | ||
*Long tails | *Long tails | ||
*Bent back tails | *Bent back tails (postponed) | ||
*Test 3D printed needles | *Test 3D printed needles (postponed) | ||
==Fabric Spool== | ===Fabric Spool=== | ||
*Apply constant tension on fabric | *Apply constant tension on fabric (postponed) | ||
*Roll onto spool for easy handling and storage | *Roll onto spool for easy handling and storage (postponed) | ||
=Part Code= | |||
==Variable Profiles== | |||
*Basic Settings for quickly choosing a specific sized machine | |||
===CKvarProfile-SockTest201904.scad=== | |||
<nowiki> | |||
= | /////////////////// USER SETTINGS /////////////////// | ||
///////////// | |||
// USING THIS FILE: | |||
// choose desired settings below | |||
// rename and save this file into the "SCAD" folder | |||
// for example CKvarsProfile-Small2019.scad | |||
// then open the file named CKvars.scad in the "SCAD" folder | |||
// find the "include" commands at the begining of the file | |||
// change this information to this new file's name, then save | |||
// you can now open then render each part file with these settings | |||
///////////// | |||
//File Notes - Small201903 | |||
// attempting to get near sock dimensions | |||
// looks like need about 1.5 to 1.0 thread diameter | |||
// approx example 20loops/54mm 170mm circumference | |||
///////////// | |||
// DIMENSIONS | |||
//number of "p2" needle guides around circle //Jan2019 //small | |||
UPp2number=6; //12 //36 ///36 //12 //8 | |||
//number of needles mounted on each "p2" part | |||
UPp2needles=6; //5 //10 ///5 //5 //7 | |||
//Note: UPp2number * UPp2needles = total needles | |||
//number of "p3" parts around circle | |||
UPp3number=2; //4 //18 ///4 //4 //2 | |||
//number of "p4" parts around circle | |||
UPp4number=2; //4 //18 ///4 //4 //2 | |||
//distance from the inside face of one needle to the next | |||
UPneedle2needle=9.12985; //default=14.35615 //try 8.414 //13.5334 //9.25 | |||
//mountain settings | |||
UPpMgrooveturnR=10; //radius of upper curved path in groove //14 //10 | |||
UPpMgrooveturnR2=7; //radius of lower curved path in groove //7 | |||
UPpMp3X=2; //length of lower plateu of groove //2.5 //2 | |||
UPpMp7X=2; //half of length of top plateu of groove //3 //2 | |||
///////////// | |||
// MATERIALS | |||
//thread diameter - used to estimate circumference | |||
UPthreadD=1.5; | |||
//number of stepper motors driving the geared plate | |||
UPc1steppersnumber=2; | |||
//laser cut part thickness | |||
UPupper_surfaceH=3.4; //thickness of upper rotating plate ///5 //6.35= 1/4"inch | |||
UPbottom_surface_motor_gearsH=3.4; //thickness of geared rotating plate | |||
UPtable_surface=3.4; //thickness of plate of main table | |||
UPtable_support=12.7; //thickness of support board below table surface | |||
//width of wood used to support table around the edges | |||
UPwoodbeamW=25.4; //table leg wood beam width 1.0 inch | |||
UPwoodbeamScrewOD=6.32; // 1/4" screw hole into wood beam | |||
//thread feeder option | |||
UPTF=1; // 0=none 1=angle iron 2=makerbeam10mm | |||
//angle iron option dimensions | |||
UPaaX=12.7; //width //12.7 = 1/2in | |||
UPaaT=1.5875; //thickness //1.5875 = 1/16in | |||
/////////////////////////////////////////////// | |||
</nowiki> | |||
===CKvarsProfile-Medium201903.scad=== | |||
<nowiki> | |||
/////////////////// USER SETTINGS /////////////////// | |||
///////////// | |||
// USING THIS FILE: | |||
// choose desired settings below | |||
// rename and save this file into the "SCAD" folder | |||
// for example CKvarsProfile-Small2019.scad | |||
// then open the file named CKvars.scad in the "SCAD" folder | |||
// find the "include" commands at the begining of the file | |||
// change this information to the new file's name, then save | |||
// you can now open then render each part file with these settings | |||
///////////// | |||
///////////// | |||
// DIMENSIONS | |||
//number of "p2" needle guides around circle //Jan2019 //small | |||
UPp2number=12; //12 //36 ///36 //12 //8 | |||
//number of needles mounted on each "p2" part | |||
UPp2needles=5; //5 //10 ///5 //5 //7 | |||
//number of "p3" parts around circle | |||
UPp3number=4; //4 //18 ///4 //4 //2 | |||
//number of "p4" parts around circle | |||
UPp4number=4; //4 //18 ///4 //4 //2 | |||
//distance from the inside face of one needle to the next | |||
UPneedle2needle=13.5334; //default=14.35615 //try 8.414 //13.5334 //9.25 | |||
//mountain settings | |||
UPpMgrooveturnR=14; //radius of upper curved path in groove //14 //10 | |||
UPpMgrooveturnR2=7; //radius of lower curved path in groove //7 | |||
UPpMp3X=2.5; //length of lower plateu of groove //2.5 //2 | |||
UPpMp7X=3; //half of length of top plateu of groove //3 //2 | |||
///////////// | |||
// MATERIALS | |||
//number of stepper motors driving the geared plate | |||
UPc1steppersnumber=2; | |||
//laser cut part thickness | |||
UPupper_surfaceH=3.4; //thickness of upper rotating plate ///5 //6.35= 1/4"inch | |||
UPbottom_surface_motor_gearsH=3.4; //thickness of geared rotating plate | |||
UPtable_surface=3.4; //thickness of plate of main table | |||
UPtable_support=12.7; //thickness of support board below table surface | |||
//width of wood used to support table around the edges | |||
UPwoodbeamW=25.4; //table leg wood beam width 1.0 inch | |||
UPwoodbeamScrewOD=6.32; // 1/4" screw hole into wood beam | |||
//thread feeder option | |||
UPTF=1; // 0=none 1=angle iron 2=makerbeam10mm | |||
//angle iron option dimensions | |||
UPaaX=12.7; //width //12.7 = 1/2in | |||
UPaaT=1.5875; //thickness //1.5875 = 1/16in | |||
/////////////////////////////////////////////// | |||
</nowiki> | |||
==CKvars.scad== | ==CKvars.scad== | ||
*Variables to be defined for all aspects of the specific machine to be built | |||
*These variables should be set the same for each part that is rendered | |||
<html> | |||
<img src="https://docs.google.com/drawings/d/e/2PACX-1vSi5lIaK-dwO559k6kWaYspWdvvspj6b-vr358_aYM-AdU00GR4bm3ikpzS_Rg3PFWmiuYuZpd0C6hu/pub?h=400"> | |||
</html> | |||
[https://docs.google.com/drawings/d/1gQg21-4yBpBythhAY__qi30Ap8RPRDDI07-t4Q87_oU/edit edit image] | |||
*calculate printer footprint for each part. | |||
<nowiki> | <nowiki> | ||
//select needle size file that will be used | ////////////////////////////////////// | ||
include < | ///// Circular Knitic Variables ////// | ||
////////////////////////////////////// | |||
////////////////////////////////////// | |||
/////// CHOOSE MAIN SETTINGS /////// | |||
//select the needle size file that will be used | |||
include <CKvarsNeedle-KH260.scad>; | |||
//select the settings profile file | |||
include <CKvarsProfile-Small201903.scad>; | |||
////////////////////////////////////// | |||
//number of "p2" parts around circle | |||
p2number=12 | ////////////////////////////////////// | ||
/////// ADVANCED SETTINGS /////// | |||
//number of "p2" parts around circle //Jan2019 //small | |||
p2number=UPp2number; //12 //36 ///36 //12 //8 | |||
//number of needles mounted on each "p2" part | //number of needles mounted on each "p2" part | ||
p2needles=5 | p2needles=UPp2needles; //5 //10 ///5 //5 //7 | ||
//number of "p3" parts around circle | //number of "p3" parts around circle | ||
p3number=4 | p3number=UPp3number; //4 //18 ///4 //4 //2 | ||
//number of "p4" parts around circle | //number of "p4" parts around circle | ||
p4number=4; | p4number=UPp4number; //4 //18 ///4 //4 //2 | ||
//distance from the inside face of one needle to the next | |||
needle2needle=UPneedle2needle; //default=14.35615 //13.5334 //9.25 | |||
//calculated diameter from inside edge of needles | |||
p2needlegrooveID=((needle2needle*p2number*p2needles)/PI); | |||
//nnumber of Z bearing mounts | |||
c1zmounts=max(p3number,4); //p3number //4 | |||
c1steppersnumber=UPc1steppersnumber; //number of stepper motors driving the gear | |||
////MATERIALS//// | ////MATERIALS//// | ||
//thread feeder stand above mountain | |||
TF=UPTF; // 0=none 1=angle iron 2=makerbeamm | |||
TFW=60; //distance between outside edge of makerbream | |||
aaX=UPaaX; //12.7 = 1/2in | |||
aaT=UPaaT; //1.5875 = 1/16in | |||
aaboltD=3; | |||
aaboltHD=5.68; | |||
aaboltHH=3; | |||
aanutH=4; | |||
aasqNutW=5.5; | |||
aasqNutH=1.8; | |||
aasqNutSlop=0.25; | |||
pM2slop=0.25; | |||
pM2H=aaX*3; | |||
pM2mink=4; | |||
pM2fH=10; | |||
tipHole=3; //hole Size | |||
tipOpenX=10; | |||
tipOpenZ=10; | |||
tipcylD=1.75; //1.5 | |||
tipcy2D=tipcylD*1.5; | |||
//-(tipOpenX/2)+(tipcylD/2) | |||
//thickness of upper rotating plate ///5 //6.35= 1/4"inch | |||
upper_surfaceH=UPupper_surfaceH; | |||
//thickness of geared rotating plate | |||
bottom_surface_motor_gearsH=UPbottom_surface_motor_gearsH; | |||
//thickness of plate of main table | |||
table_surface=UPtable_surface; | |||
//thickness of support board below main table | |||
table_support=UPtable_support; | |||
woodbeamW=UPwoodbeamW; //table leg wood beam width 1.0 inch | |||
woodbeamScrewOD=UPwoodbeamScrewOD; // 1/4" screw hole | |||
////PART SETTINGS//// | ////PART SETTINGS//// | ||
//plate | |||
pPplate1=bottom_surface_motor_gearsH; //thickness of geared plated | |||
pPplate2=upper_surfaceH; | |||
/* | |||
//"connector0912" connects upper_surface plate to bottom_surface geared plate | //"connector0912" connects upper_surface plate to bottom_surface geared plate | ||
connector0912H=12; | connector0912H=12; | ||
Line 54: | Line 285: | ||
connector0912HoleOD=3; //hole diameter | connector0912HoleOD=3; //hole diameter | ||
connector0912HoleC2C=17; //center of hole to center of other hole | connector0912HoleC2C=17; //center of hole to center of other hole | ||
*/ | |||
//p5 BearringSmall1312_x_4.stl | |||
bearingholderSmallB2C=5.5; //from base of bearing holder to center of bearing | |||
bearingholderSmallBOD=10; //Outside Diameter of bearing | |||
bearingholderSmallBID=4.9; //Inside Diameter of bore hole of bearing | |||
bearingholderSmallBW=4; //Width of bearing | |||
bearingholderSmallgaproll=0.25; //extra space to leave below bearing for rolling | |||
bearingholderSmallgapclear=0.5; //extra space to leave above bearing inside holder | |||
//BearringZ | |||
bearingholderZBOD=10; //Outside Diameter of bearing | |||
bearingholderZBID=4.9; //Inside Diameter of bore hole of bearing | |||
bearingholderZBW=4; //Width of bearing //4 | |||
//p1 - stepper gear | |||
NEMAshaftOD=5; | |||
NEMAshaftCut=0.5; | |||
NEMAshaftL=20; //length of shaft from motor face | |||
NEMAshaftFL=15; //length of flat side of shaft | |||
// | NEMAboltOD=3; | ||
NEMAboltHeadH=3; | |||
p2needlegroovefromID=2. | NEMAboltHeadOD=5.68; | ||
NEMAboltHexOD=2.87; | |||
NEMAfaceCricOD=22; | |||
NEMAboltDis=31; | |||
NEMAmotorW=42; | |||
NEMAsetboltL=8; //length of M3 botl used for set screw | |||
NEMAsetboltOD=3; | |||
NEMAsetHeadOD=5.68; | |||
NEMAsqNutW=5.5; | |||
NEMAsqNutH=1.8; | |||
NEMAsqNutSlop=0.25; | |||
spurgearTn=16; //number of teeth on bull gear | |||
//p2 - inner needle wall holder | |||
needleWidthslop=0.4; //exta thickness | |||
needleWidth=nX+needleWidthslop; | |||
p2needlegroovefromID=2.0; | |||
p2ID=p2needlegrooveID-(p2needlegroovefromID*2); | p2ID=p2needlegrooveID-(p2needlegroovefromID*2); | ||
p2needlegrooveDepth= | p2needlegrooveDepthslop=0.4; //exta thickness | ||
p2H | p2needlegrooveDepth=nY+p2needlegrooveDepthslop; | ||
p2W= | //p2H calculated below; | ||
p2W=p2needlegroovefromID+p2needlegrooveDepth; | |||
p2OD=p2ID+(p2W*2); | p2OD=p2ID+(p2W*2); | ||
p2holeH | //p2holeH calculated below | ||
p2holeD=2; | p2holeD=2; //depricate | ||
p2holeCSD=4.01726; | p2holeCSD=4.01726; //depricate | ||
p2holeCSL=1.5; | p2holeCSL=1.5; //depricate | ||
p2endtrim=0.5; //trim end of wall to give room between p2's | |||
p2p3boltType=2; //1 = reg cap screw, 2 = flat cap screw | |||
//type 1 | |||
p2p3boltD=3; | |||
p2p3boltHH=3; | |||
p2p3boltHD=5.68; | |||
//type 2 | |||
p2p3flatD=3; | |||
p2p3flatHA=90; | |||
p2p3flatHD=6.72; //listed as 6.72 max 5.54 min | |||
p2p3flatHH=1.86; | |||
p2p3nutH=4; | |||
p2p3nutOD=6.01; | |||
//p3 | p2p4flatD=3; | ||
p2p4flatHA=90; | |||
p2p4flatHD=6.72; //listed as 6.72 max 5.54 min | |||
p2p4flatHH=1.86; | |||
p2p4nutH=4; | |||
echo("p2 lower bolt L",p2W+p3upperwallW+0); //fix | |||
echo("p2ID", p2ID); | |||
//p3 - outer needle wall slide | |||
p3wiggle=0.1; | p3wiggle=0.1; | ||
p3baseH=3; | p3baseH=3; //height of outer base | ||
p3wallW=(nH-nY)/2; //half of needle butt | p3wallW=(nH-nY)/2; //half of needle butt | ||
p3upperwallW=3; | |||
p3baseholeD=3; | p3baseholeD=3; | ||
p3baseholeScrewHeadD=5.68; | |||
p3baseholefromODID=p3baseholeScrewHeadD/2; | |||
p3baseholenumber=4; | p3baseholenumber=4; | ||
p3ridgeW1=3; | p3ridgeW1=3; | ||
p3ridgeW2=5; | p3ridgeW2=5; | ||
p3ridgeH=5; | p3ridgeH=5; | ||
p3wallholefromtop=5; | |||
p3wallchamfW=2; | p3wallchamfW=2; | ||
p3wallchamfH=3; | p3wallchamfH=3; | ||
//p3wallH in calculations below | |||
//p3grooveH1 in calculations below | |||
//p3grooveH2 in calculations below | |||
p3grooveHslop=1; | |||
p3grooveWslop=0.8; //extra Width in needle groove | |||
p3grooveW=nX+p3grooveWslop; | |||
p3clear=5; //distance from top of p3 to needle flipper in down position | |||
p3baseID2N=2; //clearance between baseID and needles | |||
p3baseID=p2OD+(p3baseID2N*2); | |||
p3baseOD=p2OD+(p3wiggle*2)+(p3wallW*2)+(p3wallchamfW*2)+(p3baseholeScrewHeadD*2); | |||
centerlineD=p2ID+(p2W+(p3wiggle*2)); | |||
p3wallOD=centerlineD+(p3wallW*2)+((p2W+(p3wiggle*2)/2)); | |||
p3wallID=centerlineD+((p2W+(p3wiggle*2)/2)); | |||
p3base45W=p3ridgeW2+p3wiggle+p2W+p3wiggle+p3baseID2N; | |||
p3base45H=p3base45W; //height of 45 degree overhang | |||
p3needleholefactorW=1.5; //multiply width of needle tail hole in base by this | |||
p3endtrim=0.5; | |||
//p4 | //p4 | ||
p4rampH=14.57; | p4rampH=14.57; | ||
p4rampfromID=2.5; | p4rampfromID=2.5; | ||
p4rampoverhangH=4; | p4rampoverhangH=4; | ||
p4rsH=p4rampH-p4rampoverhangH; //height of ramp surface | |||
p4rampfromOD=1.34; | p4rampfromOD=1.34; | ||
p4rampC1=10; | p4rampC1=10; | ||
Line 97: | Line 405: | ||
p4rampC2transX=10; | p4rampC2transX=10; | ||
p4rampC2transZ=3.82; | p4rampC2transZ=3.82; | ||
p4basegapH=max(p2p4flatD*3,8); | |||
p4basegapH | p4baseH=p4basegapH+nD; //sin(45) of angle from front of needle?? | ||
p4baseW=11.2; | p4baseW=11.2; | ||
p4basegapW=5.09 | p4basegapW=p2W+0.2; //5.09 | ||
p4clawW=9; | p4clawW=min((needle2needle-(nX*2)),9); | ||
p4holesnumber=3; | p4holesnumber=3; | ||
p4holeH=5; | p4holeH=p4basegapH/2; | ||
p4rampW=max(min(p4clawW-3,4),2.5); | |||
p4rampMinkD=(p4rampW/3)*2; //minkoski diameter | |||
p4rampWm=p4rampW-p4rampMinkD; | |||
p4clear=-0.5; //distance above top of p4 from flipper in down position //need to fix -0.5? | |||
p4endtrim=0.5; | |||
echo("rampW", p4rampW); | |||
//space between rotating plates | |||
pPextra=1; //extra room below nC at lowest point | |||
pPspace2=nC+(p4baseH-p4basegapH)+pPextra; //space between geared plate and mountain plate, needle nC? //12 | |||
//p5 small bearing holder | |||
p5boltHeadOD=8; //look up sales drawing - used to cut mountain | |||
p5boltHeadH=3.65; //look up sales drawing - used to cut mountain | |||
p5nutH=3; //jam nut | |||
p5boltD=5; | |||
p5boltL=25; //bolt to hold bearings | |||
p5wingW=7; | |||
p5wingL=p5boltHeadH+p5boltL; | |||
p5wingH=3; | |||
p5bodyW=bearingholderSmallBOD+6; | |||
p5bodyL=p5boltL-p5nutH; | |||
p5bearCl=1.5; //distance from top of body to OD of bearing | |||
p5bodyH=bearingholderSmallgapclear+bearingholderSmallBOD-p5bearCl; | |||
p5wiggleL=0.4; //clearnace around bearing | |||
p5wiggleW=0.25; //clearnace around bearing | |||
p5bearingfromwall=4.25; | |||
p5mountholeOD=3; //mounting bolt OD | |||
p5mountBoltHeadOD=5.68; | |||
pPspace1=bearingholderSmallgapclear+bearingholderSmallBOD+bearingholderSmallgaproll; //? space from main table top to first plate - calc w/ bearing holder height, stepper motor shaft length? | |||
//made max of bearing holder, and p3wall45H? | |||
echo("pPspace1",pPspace1); | |||
p1H=pPspace1+pPplate1+1; | |||
//p6 big bearing holder - depricated | |||
p6wingW=30; | |||
p6wingL=25; | |||
p6wingH=3; | |||
p6bodyW=16; | |||
p6bodyL=25; | |||
p6bodyH=9.5; | |||
p6wiggleL=0.4; | |||
p6wiggleW=0.6; | |||
p6bearingfromwall=4.25; | |||
p6mountholeOD=3; | |||
p6mountholeHeadOD=5.68; //OD of socket screw head | |||
p6mounthole2front=8; | |||
p6mounthole2side=3; | |||
//p7 Z bearing holder - need to tweak more for different size bearings | |||
//bearing bolt | |||
p7boltHeadOD=8; //look up sales drawing - used to cut mountain | |||
p7boltHeadH=3.65; //look up sales drawing - used to cut mountain | |||
p7nutH=2.7; //jam nut | |||
p7boltD=5; | |||
p7boltL=16; //bolt to hold bearings | |||
p7baseH=4; | |||
p7wallW=3; | |||
p7mountH=bearingholderZBOD-2; | |||
p7mountholeOD=3; | |||
p7mountholeHeadOD=5.68; | |||
p7mountnutOD=6.01; | |||
p7mountnutH=3; | |||
p7mounthole2edge=4.5; | |||
p7bearingfromfront=3; | |||
p7wiggleL=0.4; | |||
p7wiggleW=0.25; | |||
p7baseW=bearingholderZBOD+8; //16 | |||
p7baseL=max((((p7bearingfromfront+bearingholderZBW+p7bearingfromfront)*2)+p7wallW),(p7mountholeHeadOD*2)+p7wallW,(p7mounthole2edge*2)+p7wallW); //23 | |||
p7mountL=(p7baseL-p7wallW)/2; //13 | |||
//plate | echo("suggested boltL for Z bearing", ceil(((((p7baseL-p7wallW)/2)+p7wallW+p7nutH)/2))*2 ); | ||
//p8 plate connector | |||
p8boltHeadOD=5.68; //look up sales drawing - used to cut mountain | |||
p8boltHeadH=3; //look up sales drawing - used to cut mountain | |||
p8nutH=4; //jam nut | |||
p8boltD=3; | |||
p8boltL=30; //bolt to hold bearings ???? | |||
p8baseW=8; | |||
p8holeD=p8boltD; | |||
p8H=pPspace2; | |||
echo("suggested boltL for spacer", ceil((upper_surfaceH+pPspace2+bottom_surface_motor_gearsH+p8nutH)/5)*5 ); //20,22,25,30 commonly availabble | |||
//p9 outer connector | |||
p9thickness=3; | |||
p9H=10; | |||
//mountain | //mountain | ||
pMwallT= | pMwallT=9; //min thickness from groove to back wall //7.5 //10 | ||
pMgroove=nH-nY-p3wallW+1; //depth of groove | pMgroove=nH-nY-p3wallW+1; //depth of groove | ||
pMgrooveAngle=45; | pMgrooveSlop=0.5; //height slop of groove | ||
pMgrooveC1=pPspace2; //top of groove at position 1 "entrance" | pMgrooveD=nC+pMgrooveSlop; //Z plane diamter of groove cut | ||
pMgrooveC2=nC+ | pMgrooveAngle=45; // only 45 is working | ||
pMgrooveC3= | pMgrooveC1=pPspace2; //top of groove at position 1 "entrance" pPspace2 /////////// | ||
pMgrooveC2=nC+pPextra; //top of groove at position 2 "push down" nC+2 //////////// | |||
pMwallHextra=5.75; //extra height above groove at heighest | echo("pushdown distance",pPspace2-(nC+pPextra)); | ||
threadthickness=0.5; //approx used to leave space above p2 | |||
pMgrooveC3=pMgrooveC2+(pMgrooveD-nC)-(nG+threadthickness)+(p4baseH-p4basegapH)+p4rampH+p4clear+nF; //top of groove at position 3 "top center" calc! //44.25 | |||
pMwallHextra=5.75; //extra height above groove at heighest point | |||
pMH=pMwallHextra+pMgrooveC3; //total height of mountain | |||
pMshelfH=4; //thickness of shelf resting on top of c3 - depricated | |||
pMshelfchamfR=6; //radius of chamfer at join shelf/wall | |||
pMshelfBoltD=3; | |||
pM3c2c=(pMH-(aaboltHD/2)-5)-((pPspace2+pPplate2+1)+(aaboltHD/2)+bearingholderZBOD); | |||
pM3c2e=min( | |||
pMH-(pMH-(aaboltHD/2)-5) | |||
, | |||
((pPspace2+pPplate2+1)+(aaboltHD/2)+bearingholderZBOD) | |||
-(pMshelfchamfR+pPspace2+pPplate2) | |||
); | |||
//distance between bolts + 2X the min distance from bolt to top or bolt to bottom | |||
pM3H=( | |||
pM3c2c | |||
+(2*min( | |||
pMH-(pMH-(aaboltHD/2)-5) | |||
, | |||
((pPspace2+pPplate2+1)+(aaboltHD/2)+bearingholderZBOD) | |||
-(pMshelfchamfR+pPspace2+pPplate2) | |||
)) | |||
); | |||
pM3mink=6; | |||
pM3slop=0.25; | |||
//c2 geared plate - clean up below, not used to generate gear | |||
c2H=bottom_surface_motor_gearsH; | |||
c2gap=0.6; //gap between c2ID and p3wallOD // 0.7? 0.5? 0.35? how low can you go? | |||
c2t2t=6.858; | |||
c2width=50; //depricated? | |||
c2OD=(c2width*2)+(c2gap*2)+p2OD+(p3wiggle*2)+(p3wallW*2); | |||
c2ID=(c2gap*2)+p2OD+(p3wiggle*2)+(p3wallW*2); //should this be p3wallOD+(c2gap*2) | |||
c2teeth=((c2OD*PI)/c2t2t); | |||
c2dipitch=c2teeth/(c2OD*PI); | |||
cWiggle=0.1; //extra height on mountaint cutout for c3 to sit in ?? is this used ?? | |||
///////////////////// | |||
//calculated settings | //calculated settings | ||
///////////////////// | |||
bearingholderZB2C=(bearingholderZBOD/2)+pPspace1+pPplate1+pPspace2+pPplate2; //from base of bearing holder to center of bearing | |||
rez=p2number*p2needles*2; | |||
centerlineD=p2ID+(p2W+(p3wiggle*2)); | centerlineD=p2ID+(p2W+(p3wiggle*2)); | ||
p3grooveH1=pPspace1+pPplate1; //bottom of verticle groove in p3 | |||
p3grooveH2=pPspace1+pPplate1+pMgrooveC3; //top of groove in p3 | |||
p4baseOD=centerlineD+p4baseW; | p4baseOD=centerlineD+p4baseW; | ||
Line 130: | Line 578: | ||
p4basegapID=centerlineD-p4basegapW; | p4basegapID=centerlineD-p4basegapW; | ||
firstcenter=(((((360/p2number/p2needles/2)/360*(p2OD*PI))-(needleWidth/2))/((360/p2number/p2needles/2)/360*(p2OD*PI)))*(360/p2number/p2needles/2))/2; | //firstcenter=(((((360/p2number/p2needles/2)/360*(p2OD*PI))-(needleWidth/2))/((360/p2number/p2needles/2)/360*(p2OD*PI)))*(360/p2number/p2needles/2))/2; | ||
//doesnt work on narrow needle arrangement, moved to second gap | |||
p2H=pPspace1+pPplate1+pMgrooveC2+(nA-nC-nB-nG)-threadthickness-p3base45H; | |||
p3wallH=pPspace1+pPplate1+pMgrooveC2+nA-nB-nC-nF-p3clear; | |||
p2holeH=p3grooveH2+((p3wallH-p3grooveH2)/2); //hight from table top | |||
//c3 | |||
c3ID=c2ID; | |||
c3H=upper_surfaceH; | |||
pMID=c2ID; | |||
pMODwall=c2ID+(pMgroove*2)+(pMwallT*2); | |||
//c4 paper clip connecting weight holder plate | |||
c4OD=p2ID-(p3ridgeW2*2)-(20*2); | |||
c4paperclipholeD=5; | |||
c4paperclipholeW=2; | |||
c4paperclipholetoEdge=3; | |||
///////////////////////////////// | |||
pMgrooveOR=pMgroove+(pMID/2); //center to OD of groove | |||
// is this supposed to be the radius? | |||
///////////////////////////////// | |||
//////////////////////// | |||
// MOUNTAIN VARIABLES // | |||
//////////////////////// | |||
mult=20; //rough multiplier 5-30 | |||
grez=rez*mult; //number of sides of groove path main circle | |||
gdeg=360/grez; //standard fraction of a degree per groove rez | |||
glen=(pMID*PI)/grez; //length of arc of each rez's fraction of a degree | |||
glnd=glen/gdeg; //length of standard fraction of a degree | |||
gcho=2*(pMID/2)*sin(gdeg/2); //chord length of glnd | |||
garc=gdeg*(pMID/2); //arc length... too close to get to smaller digits that are diff? | |||
echo("rez", rez); | |||
echo("grez", grez); | |||
echo("gdeg", gdeg); | |||
echo("glen", glen); | |||
echo("glnd", glnd); | |||
echo("pMgrooveC3", pMgrooveC3); | |||
//radius of upper curved path in groove //14 //10 | |||
pMgrooveturnR=UPpMgrooveturnR; | |||
//radius of lower curved path in groove //7 | |||
pMgrooveturnR2=UPpMgrooveturnR2; | |||
pMgrooveturnR3=7; // radius of entrance curved path - not used | |||
pMcutRez=2; //cuts per degree | |||
pMcutcylRez=36; //number of sides on groove cutting clylinder | |||
pMcutA=45; //angle of cut path | |||
//7 | |||
pMp7X=UPpMp7X; //half of length of plateu of groove. preferably whole number //3 //2 | |||
pMd7=pMp7X/glnd; //number of degrees for entire groove7 | |||
pMd7s=0; //degree turn to center of groove | |||
pMd7e=pMd7; //highest degree turn for section 7 | |||
pMh7s=pMgrooveC3-(pMgrooveD/2); //height of center of groove | |||
pMh7e=pMgrooveC3-(pMgrooveD/2); | |||
//6 | |||
pMp6X=cos(90-pMcutA)*pMgrooveturnR; | |||
pMd6=pMp6X/glnd; | |||
pMd6s=pMd7e; | |||
pMd6e=pMd7e+pMd6; | |||
function func6(i) = (pMgrooveturnR*cos(asin(((i-pMd6s)*(pMp6X/pMd6))/pMgrooveturnR))-pMgrooveturnR); | |||
pMh6s=pMh7e; | |||
pMh6e=pMh7e+func6(pMd6e); | |||
//5 | |||
pMh5s=pMh6e; | |||
pMh5e=0; | |||
pMp5X=(pMh5s-pMh5e)*tan(90-pMcutA); | |||
pMd5=pMp5X/glnd; | |||
pMd5s=pMd6e; | |||
pMd5e=pMd6e+pMd5; | |||
//4 | |||
pMh4e=pMgrooveC2-(pMgrooveD/2); | |||
pMp55X=(pMgrooveturnR2*tan(90-pMcutA))-(pMgrooveturnR2*sin(90-pMcutA))+(pMh4e/tan(90-pMcutA)); | |||
pMd55=pMp55X/glnd; | |||
pMp4X=cos(90-pMcutA)*pMgrooveturnR2; /////////problem with non-45 angles, p55X? | |||
pMd4=pMp4X/glnd; | |||
pMd4s=pMd5e-pMd55; | |||
pMd4e=pMd5e-pMd55+pMd4; | |||
function func4(i) = -(pMgrooveturnR2*cos(asin(((pMd4e-i)*(pMp4X/pMd4))/pMgrooveturnR2))-pMgrooveturnR2); | |||
pMh4s=func4(pMd4s); | |||
//3 | |||
pMp3X=UPpMp3X; //length of lower plateu of groove //2.5 //2 | |||
pMd3=pMp3X/glnd; //number of degrees for groove section 3 | |||
pMd3s=pMd4e; //degree turn to center of groove | |||
pMd3e=pMd4e+pMd3; //highest degree turn for section 7 | |||
pMh3s=pMh4e; //height of center of groove | |||
pMh3e=pMh4e; | |||
//2 | |||
pMp2X=cos(pMcutA)*pMgrooveturnR2; | |||
pMd2=pMp2X/glnd; | |||
pMd2s=pMd3e; | |||
pMd2e=pMd3e+pMd2; | |||
function func2(i) = -(pMgrooveturnR2*cos(asin(((i-pMd2s)*(pMp2X/pMd2))/pMgrooveturnR2))-pMgrooveturnR2); | |||
pMh2e=pMh3e+func2(pMd2s); | |||
pMh2s=pMh3e; | |||
//1 | |||
pMh1s=pMh2e; | |||
pMh1e=pMgrooveC1-(pMgrooveD)+((pMgrooveD/2)-(sin(pMcutA)*(pMgrooveD/2))); //-(cos(pMcutA)*pMgrooveturnR3); //-(pMgrooveD/2) | |||
pMp1X=((pMh1e)-(pMh1s))*tan(90-pMcutA); //-sin(45)*grooveD/2 ?? | |||
pMd1=pMp1X/glnd; | |||
pMd1s=pMd2e; | |||
pMd1e=pMd2e+pMd1; | |||
echo("extra to subtract??",sin(pMcutA)*(pMgrooveD/2)); | |||
//0 | |||
// pMp0X=pMgrooveD/2; //pMgrooveD | |||
// pMd0=pMp0X/glnd; //pMgrooveD/glnd; //define later | |||
pMp0X=0; | |||
pMd0=pMp0X/glnd; | |||
pMd0s=pMd1e; | |||
pMd0e=pMd1e+pMd0; | |||
//pM0 attempt to make curve below | |||
/* | |||
pMp0X=cos(90-pMcutA)*pMgrooveturnR3; | |||
pMd0=pMp0X/glnd; | |||
pMd0s=pMd1e; | |||
pMd0e=pMd1e+pMd0; | |||
function func0(i) = (pMgrooveturnR3*cos(asin(((i-pMd0e)*(pMp0X/pMd0))/pMgrooveturnR3))-pMgrooveturnR3); | |||
pMh0s=pMh1e; | |||
pMh0e=pMh1e+func0(pMd0e); | |||
*/ | |||
//mounting shelf and holes settings | |||
pMshelfX=pMshelfBoltD*4; //length of shelf in mm | |||
pMshelfd=pMshelfX/glnd; //number of degrees of shelf | |||
pMdS=(pMgrooveD/2)/glnd; //to trim half | |||
pMdSs=pMd1e+pMdS; | |||
pMshelfHole1X=pMshelfchamfR+(pMshelfBoltD*1.5); //distance to hole center from main body | |||
pMshelfHole1d=(pMshelfHole1X/glen)*gdeg; //number of degrees from edge to hole center | |||
pMshelfHole2X=pMshelfX-(pMshelfBoltD*1.5); //distance to hole center from main body | |||
pMshelfHole2d=(pMshelfHole2X/glen)*gdeg; //number of degrees from edge to hole center | |||
pMextman=0.0002; //increase size of filler piece to make part manifold correctly | |||
//END MOUNTAIN VARS | |||
/////////////////////// | |||
//c3 - redo with extra mountian tab/shelf distance | |||
c3OD= | |||
max( | |||
((pow((pow(((((c2ID+(pMgroove*2)+(pMwallT*2))/2)*cos(90-(pMd1e-pMd0)))+pMshelfX),2)+pow((((c2ID+(pMgroove*2)+(pMwallT*2))/2)),2)),1/2))*2)+((p7mountL+p7boltHeadH)*2) | |||
, | |||
((((p3baseOD/2)+1+p5wingL+1+p7bearingfromfront+(p7wiggleL/2)+bearingholderZBW))*2) | |||
); | |||
//removed following, going to shrink p8 as needed | |||
//(((pMID/2)+(pMgroove)+1+(p8baseL/2)+(p8holeC2C/2)+(p8holeD*1.25)+(p7mountL))*2) | |||
//MAX() of distance from mountain, and distance from plate spacers bolts | |||
//need to consider tooth size on plate c2 ?? | |||
echo("X", ((((c2ID+(pMgroove*2)+(pMwallT*2))/2)*cos(90-(pMd1e-pMd0)))+pMshelfX)); | |||
echo("Y", ((c2ID+(pMgroove*2)+(pMwallT*2))/2)); | |||
echo("c3OD=", c3OD); | |||
pMODshelf=c3OD; | |||
pMarcL=((PI*c2ID)*((pMd1e-pMd0)*2)/360); //approx arc length of mountain - could get more accurate number | |||
echo("pMarcL",pMarcL); | |||
pMmaxNum=floor((PI*c2ID)/pMarcL); //max number of mountains around circumference | |||
echo("pMmaxNum",pMmaxNum); | |||
pMnum=floor(pMmaxNum/2); | |||
echo("pMnum",pMnum); | |||
//number of sets of bearings mounted to geared plated | |||
c2bmounts=pMnum; //p3number //probably should be higher | |||
echo("c2bmounts",c2bmounts); | |||
p7number=(ceil(max( | |||
c2bmounts*1.3, | |||
4 | |||
)/4))*4; | |||
echo("p7number", p7number); | |||
//number of plate connectors | |||
c2connectors=c2bmounts*3; // need to tweak so does not overlap mountain footprint | |||
/////gear calcs///// | |||
//solve for # of teeth and circ_pitch that gives proper tooth whole depth | |||
Td=5; //tooth depth-ish? - used to calculate # teeth large gear and pitch | |||
Tn=floor(((-2*c3OD)/((c3OD-Td)-c3OD))-2); //number of teeth? - for big gear | |||
pCir=180*(c3OD-(Td))/Tn; //circular pitch - use for both big and small gear | |||
CKp1_circular_pitch=pCir; | |||
CKp1_number_of_teeth=spurgearTn; | |||
CKp1_pitch_diameter = CKp1_number_of_teeth * CKp1_circular_pitch / 180; | |||
CKp1_pitch_radius = CKp1_pitch_diameter/2; | |||
CKc2_circular_pitch=pCir; | |||
CKc2_number_of_teeth=Tn; | |||
CKc2_pitch_diameter = CKc2_number_of_teeth * CKc2_circular_pitch / 180; | |||
CKc2_pitch_radius = CKc2_pitch_diameter/2; | |||
echo("c3OD",c3OD); | |||
echo("Tn",Tn); | |||
echo("pitch",180*(c3OD-(Td))/Tn); | |||
echo("pCir",pCir); | |||
p5mounthole2front=(p5mountBoltHeadOD/2)+Td; | |||
p5mounthole2back= | |||
max( | |||
(p5mountBoltHeadOD/2)+(((pMID+(pMgroove*2))-(p3baseOD+2))/2) | |||
, | |||
(p5mountBoltHeadOD/2)+4 | |||
); | |||
//p8 | |||
p8holeend2C=4; | |||
p8innerboltO2C=(c2ID/2)+pMgroove+1+p8holeend2C; //radius of origin to center of inner bolt | |||
p8outerboltO2C=min( | |||
(c3OD/2)-p7bearingfromfront-(p7wiggleL/2)-bearingholderZBW-p7boltHeadH-1-(p8boltHeadOD/2) | |||
, | |||
CKc2_pitch_radius-(Td/2)-1-p8holeend2C | |||
); //radius of origin to center of outer bolt | |||
p8holeC2C=p8outerboltO2C-p8innerboltO2C; //p8baseL-(p8holeend2C*2) | |||
p8baseL=p8holeC2C+(p8holeend2C*2); //25 | |||
//c1 | |||
c1H=table_surface; | |||
c1width=c2width+91.36; //depricated? | |||
c1OD=(CKp1_pitch_radius+CKc2_pitch_radius+(NEMAmotorW/2)+woodbeamW+2)*2; // c2OD + (c1width-c2width); | |||
c1zOD=(((c3OD/2)-p7bearingfromfront-(p7wiggleL/2)-bearingholderZBW+(p7baseL-p7mounthole2edge))+woodbeamW+2)*2; //outside diameter of plate at Z mounts | |||
c1W=max( | |||
c1OD*(-ceil(1/(floor( (2-c1steppersnumber)*(c1steppersnumber/(2/c1steppersnumber)) )+1))+1) | |||
, | |||
c3OD | |||
); | |||
test=1; | |||
echo("floor", | |||
(-ceil(1/(floor( (2-c1steppersnumber)*(c1steppersnumber/(2/c1steppersnumber)) )+1))+1) | |||
); //if there are more than 2 steppers = 1 | |||
echo("c3OD",c3OD); | |||
echo("c1W",c1W); | |||
//p2 flat socket head screw | |||
p2p3flatORmax=((c2ID+sqrt((-4*(p2p3flatHD/2)*(p2p3flatHD/2))+((c2ID)*(c2ID))))/2)/2; //maximum radius to be within c2ID | |||
//thread feeder | |||
M2tipY=tipOpenX/2; //pM2mink | |||
M2tipZ=(((tipOpenX/2)-(nE/2))*2)+tipHole+(tipcylD/2); | |||
M2tiptopC=(((tipOpenX/2)-(nE/2))*2)+tipHole+(tipcylD/2)-(pM2mink/4); | |||
M2inX=((((c2ID+(pMgroove*2)+(pMwallT*2))/2)*cos(90-(pMd1e-pMd0)))-pMshelfchamfR-(aaX-aaT))*2; | |||
M2inY=(((c2ID+(pMgroove*2)+(pMwallT*2))/2))-((p3wallID/2)-(p2needlegrooveDepthslop/2))-(nD-nY)-nD; //(M2tipY) //(nD-nY) //tipcylD/2 | |||
M2inZ=pM2H-pM2mink; | |||
M2backwallOD=((c2ID+(pMgroove*2)+(pMwallT*2))/2)+aaT; | |||
////SETTINGS OUTPUT ECHOS/// | ////SETTINGS OUTPUT ECHOS/// | ||
Line 140: | Line 886: | ||
echo("Millimeters Between Needles:", PI*p2needlegrooveID/(p2number*p2needles)); | echo("Millimeters Between Needles:", PI*p2needlegrooveID/(p2number*p2needles)); | ||
echo("OD of p3:", p3baseOD); | |||
echo("OD of c1:", c2OD+(c1width-c2width)); | |||
/////BOM COUNT/////// | |||
if(TF==1){ | |||
echo("Thread Feeder Mount Bolt: (2)", (ceil(((((pMID/2)-(cos(pMd4s)*(pMID/2)))+pMwallT+pMgroove)-(sin(pMd4s)*(aaboltHD))-2-aaboltHH+aaT+aanutH)/2)*2) ); | |||
} | |||
</nowiki> | |||
==Needles== | |||
[[Image:CKneedle-dimensions.png|200px]] | |||
===CKneedleVars-KH820.scad=== | |||
* http://shop.sckmcl.com.hk/product_info.php?cPath=40&products_id=145 | |||
* https://www.aliexpress.com/item/32870943672.html | |||
<nowiki> | |||
//NEEDLE for Brother KH820 | |||
//measurements by dorkmo | |||
nX=1.20; //typical thickness from side to side | |||
nY=1.83; //typical thickness from front to back | |||
nA=137.15; //total length of needle | |||
nB=53.7; //distance from bottom of needle to bottom of bent tab. | |||
nC=3.75; //thickness of bent tab. top to bottom. | |||
nD=3.6; //hook front to back | |||
nE=2.95; //from top of loop to bottom of hook | |||
nF=17.04; //from top of loop to bottom of flipper in down position | |||
nG=0.85; //minimum thickness of hook. front to back. | |||
nH=17.00; //max distance from front to back | |||
nT=0; //0=straight tail 1=bent tail aka folded back. Y of tail = C if T=1. | |||
</nowiki> | </nowiki> | ||
== | ===CKneedleVars-KH260.scad=== | ||
* | [[Image:CKneedle-kh260.png|400px]] | ||
** | |||
*need to | *purchased here: http://shop.sckmcl.com.hk/product_info.php?products_id=136 | ||
* | |||
<nowiki> | |||
//NEEDLE for Brother KH260 | |||
//measurements by dorkmo | |||
nX=1.4; //typical thickness from side to side | |||
nY=2.44; //typical thickness from front to back | |||
nA=157.9; //total length of needle | |||
nB=53; //distance from bottom of needle to bottom of bent tab. | |||
nC=4.82; //thickness of bent tab. top to bottom. | |||
nD=5.48; //hook front to back | |||
nE=4.10; //from top of loop to bottom of hook | |||
nF=22.0; //from top of loop to bottom of flipper in down position | |||
nG=1.10; //minimum thickness of hook. front to back. | |||
nH=17.03; //max distance from front to back | |||
nT=0; //0=straight tail 1=bent tail aka folded back. Y of tail = C if T=1. | |||
</nowiki> | |||
===CKneedleVars-SK120.scad=== | |||
*difficult to find these exact needles for sale | |||
<nowiki> | |||
//NEEDLE for SK120 | |||
//measured by original CircularKnitic team | |||
nX=1.4; //typical thickness from side to side | |||
nY=2.44; //typical thickness from front to back | |||
nA=97.73; //total length of needle | |||
nB=7.72; //distance from bottom of needle to bottom of bent tab. | |||
nC=4.92; //thickness of bent tab. top to bottom. | |||
nD=5.09; //hook front to back | |||
nE=4.62; //from top top loop to bottom of hook | |||
nF=19.94; //top to bottom of flipper in down position | |||
nG=1.04; //minimum thickness of hook. front to back. | |||
nH=16.4; //max distance from front to back | |||
nT=0; //0=straight tail 1=bent tail aka folded back. Y of tail = C of T=1. | |||
</nowiki> | |||
==3D Prints== | |||
*Parts to be printed on the 3D printer | |||
===CKp1.scad "motor gear"=== | |||
[[Image:CKp1.png|400px]] | |||
:Uses 2 parts | |||
:*M3 Square Nut | |||
:**https://www.fastenal.com/products/details/0161907 | |||
:*M3x8 Bolt, 6 or 10 might work | |||
:**https://www.fastenal.com/products/details/86002 | |||
*need to fix "child()" OpenScad error | |||
<nowiki> | |||
include <CKvars.scad>; | |||
use <CKc3--topplate.scad> | |||
////// | |||
//=BOM= | |||
//M3 Square Nut https://www.fastenal.com/products/details/0161907 | |||
//M3x8 Bolt https://www.fastenal.com/products/details/86002 | |||
////// | |||
rez=p2number*p2needles*2; //calculate desired rezolution | |||
$fn=rez; //defines resolution of circles. | |||
pi=3.1415926535897932384626433832795; | |||
mirror([0,0,1]) | |||
CKp1(); | |||
module CKp1(){ | |||
difference(){ | |||
union(){ | |||
difference(){ | |||
gear (circular_pitch=pCir, | |||
gear_thickness = p1H, | |||
rim_thickness = p1H, | |||
hub_thickness = p1H, | |||
circles=0); | |||
cylinder(h=p1H+2,d=NEMAshaftOD); // donut hole | |||
difference(){ | |||
cylinder(d=c3OD,h=pPspace1-1); | |||
cylinder(d=NEMAfaceCricOD+2,h=pPspace1-1); | |||
} | |||
}//end difference | |||
//flat shaft face | |||
rotate([0,0,360/spurgearTn/2]) | |||
translate([(NEMAshaftOD/2)-NEMAshaftCut,-NEMAshaftOD/2,0]) | |||
cube([NEMAshaftOD,NEMAshaftOD,p1H]); | |||
}//end union | |||
//square nut hole | |||
rotate([0,0,360/spurgearTn/2]) | |||
translate([(NEMAshaftOD/2)-NEMAshaftCut+1.5-(NEMAsqNutSlop/2),-((NEMAsqNutW+NEMAsqNutSlop)/2),0]) | |||
cube([NEMAsqNutH+NEMAsqNutSlop,NEMAsqNutW+NEMAsqNutSlop,pPspace1-1]); | |||
rotate([0,0,360/spurgearTn/2]) | |||
translate([0,0,(pPspace1-1)/2]) | |||
rotate([0,90,0]) | |||
cylinder(d=NEMAsetboltOD,h=NEMAfaceCricOD/2); | |||
rotate([0,0,360/spurgearTn/2]) | |||
translate([(NEMAshaftOD/2)-NEMAshaftCut+NEMAsetboltL-0.5,0,(pPspace1-1)/2]) | |||
rotate([0,90,0]) | |||
cylinder(d=NEMAsetHeadOD+1,h=NEMAfaceCricOD/2); | |||
}//end difference | |||
}//end module | |||
// Parametric Involute Bevel and Spur Gears by GregFrost | |||
// It is licensed under the Creative Commons - GNU LGPL 2.1 license. | |||
// © 2010 by GregFrost, thingiverse.com/Amp | |||
// http://www.thingiverse.com/thing:3575 and http://www.thingiverse.com/thing:3752 | |||
//================================================== | |||
// Bevel Gears: | |||
// Two gears with the same cone distance, circular pitch (measured at the cone distance) | |||
// and pressure angle will mesh. | |||
module gear ( | |||
number_of_teeth=spurgearTn, | |||
circular_pitch=false, diametral_pitch=false, | |||
pressure_angle=28, | |||
clearance = 0.2, | |||
gear_thickness=5, | |||
rim_thickness=8, | |||
rim_width=5, | |||
hub_thickness=10, | |||
hub_diameter=15, | |||
bore_diameter=5, | |||
circles=0, | |||
backlash=0, | |||
twist=0, | |||
involute_facets=0, | |||
flat=false) | |||
{ | |||
if (circular_pitch==false && diametral_pitch==false) | |||
echo("MCAD ERROR: gear module needs either a diametral_pitch or circular_pitch"); | |||
//Convert diametrial pitch to our native circular pitch | |||
circular_pitch = (circular_pitch!=false?circular_pitch:180/diametral_pitch); | |||
// Pitch diameter: Diameter of pitch circle. | |||
pitch_diameter = number_of_teeth * circular_pitch / 180; | |||
pitch_radius = pitch_diameter/2; | |||
echo ("Teeth:", number_of_teeth, " Pitch radius:", pitch_radius); | |||
// Base Circle | |||
base_radius = pitch_radius*cos(pressure_angle); | |||
// Diametrial pitch: Number of teeth per unit length. | |||
pitch_diametrial = number_of_teeth / pitch_diameter; | |||
// Addendum: Radial distance from pitch circle to outside circle. | |||
addendum = 1/pitch_diametrial; | |||
//Outer Circle | |||
outer_radius = pitch_radius+addendum; | |||
//Use if statement and mix/max to select tooth count and circular pitch that creates a radius that is smaller than the OD of the CKp3 | |||
//circular pitch defined bt ckp3OD. number of teeth calculated for target addendum. | |||
echo("radius",outer_radius); | |||
// Dedendum: Radial distance from pitch circle to root diameter | |||
dedendum = addendum + clearance; | |||
// Root diameter: Diameter of bottom of tooth spaces. | |||
root_radius = pitch_radius-dedendum; | |||
backlash_angle = backlash / pitch_radius * 180 / pi; | |||
half_thick_angle = (360 / number_of_teeth - backlash_angle) / 4; | |||
// Variables controlling the rim. | |||
rim_radius = root_radius - rim_width; | |||
// Variables controlling the circular holes in the gear. | |||
circle_orbit_diameter=hub_diameter/2+rim_radius; | |||
circle_orbit_curcumference=pi*circle_orbit_diameter; | |||
// Limit the circle size to 90% of the gear face. | |||
circle_diameter= | |||
min ( | |||
0.70*circle_orbit_curcumference/circles, | |||
(rim_radius-hub_diameter/2)*0.9); | |||
difference() | |||
{ | |||
union () | |||
{ | |||
difference () | |||
{ | |||
linear_exturde_flat_option(flat=flat, height=rim_thickness, convexity=10, twist=twist) | |||
gear_shape ( | |||
number_of_teeth, | |||
pitch_radius = pitch_radius, | |||
root_radius = root_radius, | |||
base_radius = base_radius, | |||
outer_radius = outer_radius, | |||
half_thick_angle = half_thick_angle, | |||
involute_facets=involute_facets); | |||
if (gear_thickness < rim_thickness) | |||
translate ([0,0,gear_thickness]) | |||
cylinder (r=rim_radius,h=rim_thickness-gear_thickness+1); | |||
} | |||
if (gear_thickness > rim_thickness) | |||
linear_exturde_flat_option(flat=flat, height=gear_thickness) | |||
circle (r=rim_radius); | |||
if (flat == false && hub_thickness > gear_thickness) | |||
translate ([0,0,gear_thickness]) | |||
linear_exturde_flat_option(flat=flat, height=hub_thickness-gear_thickness) | |||
circle (r=hub_diameter/2); | |||
} | |||
translate ([0,0,-1]) | |||
linear_exturde_flat_option(flat =flat, height=2+max(rim_thickness,hub_thickness,gear_thickness)) | |||
circle (r=bore_diameter/2); | |||
if (circles>0) | |||
{ | |||
for(i=[0:circles-1]) | |||
rotate([0,0,i*360/circles]) | |||
translate([circle_orbit_diameter/2,0,-1]) | |||
linear_exturde_flat_option(flat =flat, height=max(gear_thickness,rim_thickness)+3) | |||
circle(r=circle_diameter/2); | |||
} | |||
} | |||
} | |||
module linear_exturde_flat_option(flat =false, height = 10, center = false, convexity = 2, twist = 0) | |||
{ | |||
if(flat==false) | |||
{ | |||
linear_extrude(height = height, center = center, convexity = convexity, twist= twist) child(0); | |||
} | |||
else | |||
{ | |||
child(0); | |||
} | |||
} | |||
module gear_shape ( | |||
number_of_teeth, | |||
pitch_radius, | |||
root_radius, | |||
base_radius, | |||
outer_radius, | |||
half_thick_angle, | |||
involute_facets) | |||
{ | |||
union() | |||
{ | |||
rotate (half_thick_angle) circle ($fn=number_of_teeth*2, r=root_radius); | |||
for (i = [1:number_of_teeth]) | |||
{ | |||
rotate ([0,0,i*360/number_of_teeth]) | |||
{ | |||
involute_gear_tooth ( | |||
pitch_radius = pitch_radius, | |||
root_radius = root_radius, | |||
base_radius = base_radius, | |||
outer_radius = outer_radius, | |||
half_thick_angle = half_thick_angle, | |||
involute_facets=involute_facets); | |||
} | |||
} | |||
} | |||
} | |||
module involute_gear_tooth ( | |||
pitch_radius, | |||
root_radius, | |||
base_radius, | |||
outer_radius, | |||
half_thick_angle, | |||
involute_facets) | |||
{ | |||
min_radius = max (base_radius,root_radius); | |||
pitch_point = involute (base_radius, involute_intersect_angle (base_radius, pitch_radius)); | |||
pitch_angle = atan2 (pitch_point[1], pitch_point[0]); | |||
centre_angle = pitch_angle + half_thick_angle; | |||
start_angle = involute_intersect_angle (base_radius, min_radius); | |||
stop_angle = involute_intersect_angle (base_radius, outer_radius); | |||
res=(involute_facets!=0)?involute_facets:($fn==0)?5:$fn/4; | |||
union () | |||
{ | |||
for (i=[1:res]) | |||
assign ( | |||
point1=involute (base_radius,start_angle+(stop_angle - start_angle)*(i-1)/res), | |||
point2=involute (base_radius,start_angle+(stop_angle - start_angle)*i/res)) | |||
{ | |||
assign ( | |||
side1_point1=rotate_point (centre_angle, point1), | |||
side1_point2=rotate_point (centre_angle, point2), | |||
side2_point1=mirror_point (rotate_point (centre_angle, point1)), | |||
side2_point2=mirror_point (rotate_point (centre_angle, point2))) | |||
{ | |||
polygon ( | |||
points=[[0,0],side1_point1,side1_point2,side2_point2,side2_point1], | |||
paths=[[0,1,2,3,4,0]]); | |||
} | |||
} | |||
} | |||
} | |||
// Mathematical Functions | |||
//=============== | |||
// Finds the angle of the involute about the base radius at the given distance (radius) from it's center. | |||
//source: http://www.mathhelpforum.com/math-help/geometry/136011-circle-involute-solving-y-any-given-x.html | |||
function involute_intersect_angle (base_radius, radius) = sqrt (pow (radius/base_radius, 2) - 1) * 180 / pi; | |||
// Calculate the involute position for a given base radius and involute angle. | |||
function rotated_involute (rotate, base_radius, involute_angle) = | |||
[ | |||
cos (rotate) * involute (base_radius, involute_angle)[0] + sin (rotate) * involute (base_radius, involute_angle)[1], | |||
cos (rotate) * involute (base_radius, involute_angle)[1] - sin (rotate) * involute (base_radius, involute_angle)[0] | |||
]; | |||
function mirror_point (coord) = | |||
[ | |||
coord[0], | |||
-coord[1] | |||
]; | |||
function rotate_point (rotate, coord) = | |||
[ | |||
cos (rotate) * coord[0] + sin (rotate) * coord[1], | |||
cos (rotate) * coord[1] - sin (rotate) * coord[0] | |||
]; | |||
function involute (base_radius, involute_angle) = | |||
[ | |||
base_radius*(cos (involute_angle) + involute_angle*pi/180*sin (involute_angle)), | |||
base_radius*(sin (involute_angle) - involute_angle*pi/180*cos (involute_angle)) | |||
]; | |||
</nowiki> | |||
===CKp2.scad "inner"=== | |||
[[Image:CKp2v1803.png|400px]] | |||
*need to fix hole matching with p4 | |||
<nowiki> | |||
include <CKvars.scad>; | |||
CKp2(); | |||
module CKp2(){ | |||
rez=p2number*p2needles*2; | |||
$fn=rez; //defines resolution of circles. | |||
translate([p2OD/2,0,0]){ | |||
difference(){ | |||
union(){ | |||
difference(){ | |||
cylinder(h=p2H,d=p2OD); | |||
cylinder(h=p2H,d=p2ID); | |||
} | |||
for(i=[0:p2needles+1]){ | |||
rotate([0,0,i*-360/p2number/p2needles]) | |||
translate([-(p2ID/2)-0.1,0,p2holeH-p3base45H]) | |||
rotate([0,90,0]) | |||
cylinder(h=p2p3flatD/6, d1=p2p3nutOD+p2p3flatD, d2=p2p3nutOD,$fn=36); | |||
} | |||
} | |||
translate([-p2OD/2,-p2OD/2,0]){ | |||
cube([p2OD,p2OD/2,p2H]); //trim side | |||
} | |||
rotate([0,0,-360/p2number]){ | |||
translate([-p2OD/2,0,0]) | |||
cube([p2OD,p2OD/2,p2H]); //trim other side | |||
} | |||
for(i=[1:p2needles]){ | |||
rotate([0,0,(360/p2number/p2needles/2)-(360/p2number/p2needles*i)]){ | |||
translate([-p2OD/2-0.2,-needleWidth/2,0]) | |||
cube([p2needlegrooveDepth+0.2,needleWidth,p2H]); | |||
} | |||
} | |||
for(i=[0:p2needles+1]){ | |||
rotate([0,0,i*-360/p2number/p2needles]) | |||
translate([-p2OD/2-0.2,0,p2holeH-p3base45H]) | |||
rotate([0,90,0]) | |||
cylinder(h=p2OD-p2ID+0.2, d=p2p3flatD,$fn=36); | |||
} | |||
echo(((((360/p2number/p2needles/2)/360*(p2OD*PI))-(needleWidth/2))/((360/p2number/p2needles/2)/360*(p2OD*PI)))*(360/p2number/p2needles/2)); | |||
//firstcenter=(((((360/p2number/p2needles/2)/360*(p2OD*PI))-(needleWidth/2))/((360/p2number/p2needles/2)/360*(p2OD*PI)))*(360/p2number/p2needles/2))/2; not using | |||
//end hole | |||
//p4 mount holes | |||
// 1st p4 mount hole | |||
rotate([0,0,-(360/p2number/p2needles)*2]){ | |||
translate([-p2OD/2-0.2,0,p2H-(p4basegapH-p4holeH)]) | |||
rotate([0,90,0]){ | |||
cylinder(h=p2OD-p2ID+0.2, d=p2p4flatD,$fn=36); | |||
} | |||
} | |||
//2nd p4 mount hole | |||
// 2nd hole | |||
rotate([0,0,-(360/p2number/p2needles)*3]){ | |||
translate([-p2OD/2-0.2,0,p2H-(p4basegapH-p4holeH)]) | |||
rotate([0,90,0]){ | |||
#cylinder(h=p2OD-p2ID+0.2, d=p2p4flatD,$fn=36); | |||
} | |||
} | |||
//end p4 mount holes | |||
//trim end of part | |||
if(p2number>1){ | |||
rotate([0,0,-(360/(p2OD*PI/p2endtrim))]) | |||
mirror([1,1,0]) | |||
#cube([p2OD/2,p2OD/2,p2H]); | |||
} | |||
} //end main difference | |||
} //end main translate | |||
} //end module | |||
</nowiki> | |||
===CKp3.scad "outer"=== | |||
[[Image:CKp3-v2.png|400px]] | |||
*could make base bolt similar to p7 with bolt in sloped wall. | |||
**coul move closer to p3wallOD | |||
*what to do if needle has bent back tail? | *what to do if needle has bent back tail? | ||
Line 156: | Line 1,396: | ||
include <CKvars.scad>; | include <CKvars.scad>; | ||
/* | |||
/////////////////// | |||
use <CKneedle.scad>; | |||
rotate([0,0,(360/p2number*p2needles/2)]){ | |||
translate([0,0,-nB+(pPspace1+pPplate1)]) | |||
rotate([0,0,(360/(p2number*p2needles))*1]) | |||
translate([(p2needlegrooveDepthslop/2),0,0]) | |||
translate([0,nX/2,0]) | |||
rotate([90,0,0]) | |||
needle(); | |||
translate([0,0,-nB+(pPspace1+pPplate1+pMgrooveC1-nC)]) | |||
rotate([0,0,(360/(p2number*p2needles))*2]) | |||
translate([(p2needlegrooveDepthslop/2),0,0]) | |||
translate([0,nX/2,0]) | |||
rotate([90,0,0]) | |||
needle(); | |||
translate([0,0,-nB+(pPspace1+pPplate1+pMgrooveC2-nC)]) | |||
rotate([0,0,(360/(p2number*p2needles))*3]) | |||
translate([(p2needlegrooveDepthslop/2),0,0]) | |||
translate([0,nX/2,0]) | |||
rotate([90,0,0]) | |||
needle(); | |||
translate([0,0,-nB+(pPspace1+pPplate1+pMgrooveC3-nC)]) | |||
rotate([0,0,(360/(p2number*p2needles))*4]) | |||
translate([(p2needlegrooveDepthslop/2),0,0]) | |||
translate([0,nX/2,0]) | |||
rotate([90,0,0]) | |||
needle(); | |||
} | |||
/////////////////// | |||
*/ | |||
translate([-p3baseOD/2,0,0]) | |||
CKp3(); | CKp3(); | ||
echo("p3wallH",p3wallH); | |||
module CKp3(){ | module CKp3(){ | ||
rez= | rez=p2number*p2needles*2; | ||
//p2number*p2needles*2 | |||
//p2number*2*2; | |||
$fn=rez; //defines resolution of circles. | $fn=rez; //defines resolution of circles. | ||
centerlineD=p2ID+(p2W+(p3wiggle*2)); | centerlineD=p2ID+(p2W+(p3wiggle*2)); | ||
echo(centerlineD); | |||
translate([p3baseOD/2,0,0]){ | |||
difference(){ | |||
union(){ | |||
cylinder(h=p3baseH,d=p3baseOD); | |||
cylinder(h=p3base45H,d=p3baseID); | |||
//ridge | |||
translate([0,0,p3base45H]) | |||
difference(){ | |||
cylinder(h=p3ridgeH,d=centerlineD-((p2W+(p3wiggle*2)/2))); | |||
translate([0,0,0]) | |||
cylinder(h=p3ridgeH,d1=centerlineD-(p3ridgeW2*2)-((p2W+(p3wiggle*2)/2)),d2=centerlineD-(p3ridgeW1*2)-((p2W+(p3wiggle*2)/2))); | |||
} //end diff | |||
difference(){ | |||
translate([0,0,p3baseH]) | |||
cylinder(h=p3wallchamfH,d1=centerlineD+((p3wallchamfW+p3wallW)*2)+((p2W+(p3wiggle*2)/2)),d2=centerlineD+(p3wallW*2)+((p2W+(p3wiggle*2)/2))); | |||
cylinder(h=p3wallchamfH+p3baseH,d=centerlineD+((p2W+(p3wiggle*2)/2))); | |||
} | |||
difference(){ | |||
cylinder(h=p3wallH,d=centerlineD+(p3wallW*2)+((p2W+(p3wiggle*2)/2))); | |||
cylinder(h=p3wallH,d=centerlineD+((p2W+(p3wiggle*2)/2))); | |||
} | |||
} //end main union | |||
cylinder(h=p3wallH,d=p3baseID-(p3base45W*2)+1); | |||
cylinder(h=p3base45H,d1=p3baseID,d2=p3baseID-(p3base45W*2)); | |||
translate([-p3baseOD/2,-p3baseOD/2,0]){ | |||
cube([p3baseOD,p3baseOD/2,p3wallH]); | |||
} | |||
rotate([0,0,-360/p3number]){ | |||
translate([-p3baseOD/2,0,0]) | |||
cube([p3baseOD,p3baseOD/2,p3wallH]); | |||
} | |||
//thin wall | |||
translate([0,0,p3grooveH2]) | |||
difference(){ | |||
cylinder(d=p3wallOD,h=p3wallH); | |||
cylinder(d=p3wallID+(p3upperwallW*2),h=p3wallH); | |||
cylinder(d1=p3wallOD,d2=p3wallID+(p3upperwallW*2),h=p2holeH-(p9H/2)-p3grooveH2-1); | |||
} | |||
//slots | |||
for(i=[1:p2needles*(p2number/p3number)]){ | |||
rotate([0,0,(360/p2number/p2needles/2)-(360/p2number/p2needles*i)]){ | |||
translate([((-centerlineD-(p3wallW*2)-((p2W+(p3wiggle*2)/2)))/2)-0.1,-p3grooveW/2,p3grooveH1-p3grooveHslop]) | |||
cube([p3wallW+0.2,p3grooveW,p3grooveH2-p3grooveH1+(p3grooveHslop*2)]); | |||
} | |||
} | |||
//base mounting holes | |||
for(i=[1:p3baseholenumber]){ | |||
rotate([0,0,(((360/p3number/p3baseholenumber))/2)-((360/p3number/p3baseholenumber)*i)]){ | |||
translate([-(p3baseOD/2)+p3baseholefromODID,0,0]) | |||
cylinder(h=p3baseH,d=p3baseholeD,$fn=18); | |||
} | |||
} | |||
//p2 flat head chamger mounting cuts | |||
for(i=[3:(p2needles*p2number/p3number)-3]){ | |||
rotate([0,0,(i*-360/(p2number*p2needles))+180]){ | |||
translate([p3upperwallW+(p3wallID/2),0,p2holeH]) | |||
rotate([0,270,0]) | |||
translate([0,0,0]) | |||
union(){ | |||
#cylinder(d1=p2p3flatHD,d2=0,h=(p2p3flatHD/2)/tan(45),$fn=36); | |||
translate([0,0,-(p2p3flatHD)/tan(45)]) | |||
cylinder(d1=p2p3flatHD*3,d2=p2p3flatHD,h=(p2p3flatHD)/tan(45),$fn=36); | |||
//cylinder(d=p2p3flatD,h=p3upperwallW+(p2W+(p3wiggle*2)/2)+p2p3nutH,$fn=36); | |||
} | |||
// translate([((-centerlineD-(p3wallW*2)-((p2W+(p3wiggle*2)/2)))/2)-0.1,0,p2holeH]) | |||
// rotate([0,90,0]){ | |||
// cylinder(h=p2OD-p2ID+0.2, d=p2holeD,$fn=36); | |||
// } //end rotate | |||
} //end rotate | |||
} //end for | |||
//p2 flat head chamger mounting cuts | |||
for(i=[0:2]){ | |||
rotate([0,0,(i*-360/(p2number*p2needles))+180]){ | |||
translate([p9thickness+p3upperwallW+(p3wallID/2),0,p2holeH]) | |||
rotate([0,270,0]) | |||
translate([0,0,0]) | |||
union(){ | |||
cylinder(d1=p2p3flatHD,d2=0,h=(p2p3flatHD/2)/tan(45),$fn=36); | |||
translate([0,0,-(p2p3flatHD)/tan(45)]) | |||
#cylinder(d1=p2p3flatHD*3,d2=p2p3flatHD,h=(p2p3flatHD)/tan(45),$fn=36); | |||
} //end union | |||
} //end rotate | |||
} //end for | |||
for(i=[(p2needles*p2number/p3number)-2:(p2needles*p2number/p3number)]){ | |||
rotate([0,0,(i*-360/(p2number*p2needles))+180]){ | |||
translate([p9thickness+p3upperwallW+(p3wallID/2),0,p2holeH]) | |||
rotate([0,270,0]) | |||
translate([0,0,0]) | |||
union(){ | |||
cylinder(d1=p2p3flatHD,d2=0,h=(p2p3flatHD/2)/tan(45),$fn=36); | |||
translate([0,0,-(p2p3flatHD)/tan(45)]) | |||
#cylinder(d1=p2p3flatHD*3,d2=p2p3flatHD,h=(p2p3flatHD)/tan(45),$fn=36); | |||
} //end union | |||
} //end rotate | |||
} //end for | |||
for(i=[0:(p2needles*p2number)]){ | |||
rotate([0,0,(i*-360/(p2number*p2needles))+180]){ | |||
translate([p3upperwallW+(p3wallID/2),0,p2holeH]) | |||
rotate([0,270,0]) | |||
translate([0,0,0]) | |||
union(){ | |||
cylinder(d=p2p3flatD,h=p3upperwallW+(p2W+(p3wiggle*2)/2)+p2p3nutH,$fn=36); | |||
} | |||
// translate([((-centerlineD-(p3wallW*2)-((p2W+(p3wiggle*2)/2)))/2)-0.1,0,p2holeH]) | |||
// rotate([0,90,0]){ | |||
// cylinder(h=p2OD-p2ID+0.2, d=p2holeD,$fn=36); | |||
// } //end rotate | |||
} //end rotate | |||
} //end for | |||
/* | |||
//p2 mounting holes flat chamfers | |||
for(i=[3:(p2needles*p2number/p3number)-3]){ | |||
rotate([0,0,(i*-360/(p2number*p2needles))]){ | |||
translate([p3upperwallW+(p3wallID/2),0,p2holeH]) | |||
rotate([0,270,0]) | |||
translate([0,0,0]) | |||
union(){ | |||
translate([0,0,-(p2p3flatHD)/tan(45)]) | |||
cylinder(d1=p2p3flatHD*3,d2=p2p3flatHD,h=(p2p3flatHD)/tan(45),$fn=36); | |||
cylinder(d=p2p3flatD,h=p3upperwallW+(p2W+(p3wiggle*2)/2)+p2p3nutH,$fn=36); | |||
} | |||
} | |||
} | |||
*/ | |||
/* | |||
for(i=[0:(p2number/p3number)-1]){ | |||
rotate([0,0,(-360/p2number/p2needles*(p2needles-1))+(i*-360/p2number)]){ | |||
translate([((-centerlineD-(p3wallW*2)-((p2W+(p3wiggle*2)/2)))/2)-0.1,0,p2holeH]) | |||
rotate([0,90,0]){ | |||
#cylinder(h=p2OD-p2ID+0.2, d=p2holeD, $fn=18); | |||
} | |||
} | |||
}//end for | |||
*/ | |||
//end middle holes | |||
//trim end of part | |||
if(p3number>1){ | |||
rotate([0,0,-(360/(p3baseOD*PI/p3endtrim))]) | |||
mirror([1,1,0]) | |||
cube([p3baseOD/2,p3baseOD/2,p3wallH]); | |||
} | |||
//base needle holes | |||
difference(){ | |||
for(i=[1:p2needles*(p2number/p3number)]){ | |||
rotate([0,0,(360/p2number/p2needles/2)-(360/p2number/p2needles*i)]){ | |||
translate([-(p3wallID/2),-p3grooveW*p3needleholefactorW/2,0]) | |||
#cube([(p3wallID/2),p3grooveW*p3needleholefactorW,p3base45H+p3ridgeH+1]); //Z = p3base45H | |||
} | |||
} | |||
difference(){ | |||
cylinder(d=p3wallOD,h=p3base45H+p3ridgeH+1); | |||
cylinder(d=p3wallID,h=p3base45H+p3ridgeH+1); | |||
} | |||
//cylinder(d=centerlineD-((p2W+(p3wiggle*2)/2)),h=p3base45H+p3ridgeH+1); | |||
} | |||
} //end main difference | |||
} //end main translate | |||
} //end module | |||
</nowiki> | |||
===CKp4.scad "yard holder"=== | |||
[[Image:CKp4v1803.png|400px]] | |||
<nowiki> | |||
include <CKvars.scad>; | |||
CKp4(); | |||
module CKp4(){ | |||
rez=p2number*p2needles*2; | |||
translate([ | $fn=rez; //defines resolution of circles. | ||
translate([p4baseOD/2,0,0]){ | |||
difference(){ | difference(){ | ||
union(){ | union(){ | ||
cylinder(h= | cylinder(h=p4baseH,d=p4baseOD-(p4basegapW*2)-((p4baseW-p4basegapW)/2*2)); | ||
//ramps | |||
for(i=[1:p2needles*(p2number/p4number)]){ | |||
rotate([0,0,(360/p2number/p2needles)-(360/p2number/p2needles*i)-(((360/p2number/p2needles))/2)]){ | |||
difference(){ | difference(){ | ||
minkowski(){ | |||
union(){ | |||
translate([-p4baseOD/2+p4rampfromOD,p4rampWm/2,p4rampH+p4baseH-(p4rampC1/2)]) | |||
rotate([90,0,0]) | |||
cylinder(h=p4rampWm,d=p4rampC1); | |||
intersection(){ | |||
translate([-10,0,3.82]) | |||
translate([-p4baseOD/2+p4rampfromOD,p4rampWm/2,p4rampH+p4baseH-(p4rampC2/2)]) | |||
rotate([90,0,0]) | |||
cylinder(h=p4rampWm,d=p4rampC2); | |||
translate([-7,0,-2.86/2]) | |||
translate([-p4baseOD/2+p4rampfromOD,p4rampWm/2,p4rampH+p4baseH-(p4rampC2/2)]) | |||
cube([p4rampC2,p4rampC2,p4rampC2],center=true); | |||
} | } | ||
}//end union | |||
difference(){ | |||
translate([-p4rampMinkD/2,0,0]) | |||
cylinder(d=p4rampMinkD,h=0.01, $fn=36); | |||
translate([-p4rampMinkD,0,-0.01]) | |||
cube([p4rampMinkD,p4rampMinkD,0.02], center=true); | |||
} //end diff | |||
} //end mink | |||
translate([-p4rampC2/2,0,0]) | |||
translate([-p4baseOD/2+p4rampfromOD,p4rampW/2,p4rampH+p4baseH-(p4rampC2/2)]) | |||
#cube([p4rampC2,p4rampC2,p4rampC2+1],center=true); | |||
translate([0,0,0]) | |||
translate([-p4baseOD/2+p4rampfromOD,p4rampW/2,p4baseH-(p4rampC2/2)-0.1]) | |||
cube([p4rampC2,p4rampC2,p4rampC2],center=true); | |||
translate([0,-p4clawW/2,0]) | |||
translate([-(p4baseID/2)-p4rampfromID,0,p4baseH]) | |||
cube([(p4baseID/2)+p4rampfromID,p4clawW,p4rampoverhangH]); | |||
translate([-7,0,0]) | |||
translate([-p4baseOD/2+p4rampfromOD,(p4rampW/2)+(p4rampC2/2)-0.01,p4rampH+p4baseH-(p4rampC2/2)]) | |||
cube([p4rampC2,p4rampC2,p4rampC2],center=true); | |||
translate([-7,0,0]) | |||
translate([-p4baseOD/2+p4rampfromOD,-(p4rampW/2)-(p4rampC2/2)+0.01,p4rampH+p4baseH-(p4rampC2/2)]) | |||
cube([p4rampC2,p4rampC2,p4rampC2],center=true); | |||
}//end ramps difference | |||
} //end for rotate | |||
} //end for | |||
//claws | |||
for(i=[1:p2needles*(p2number/p4number)]){ | |||
rotate([0,0,(360/p2number/p2needles)-(360/p2number/p2needles*i)-(((360/p2number/p2needles))/2)]){ | |||
translate([-p4baseOD/2,-p4clawW/2,0]) | |||
cube([(p4baseOD-p4baseID)/2,p4clawW,p4baseH]); | |||
} | |||
}//end for | |||
} //end main union | } //end main union | ||
cylinder(h= | cylinder(h=p4baseH,d=p4baseID); | ||
translate([- | |||
cube([ | //simiple chamfer of inside corner | ||
translate([0,0,p4baseH-0.5]) | |||
cylinder(h=0.5,d1=p4baseID+0.5,d2=p4baseID+1.9); | |||
translate([0,0,p4baseH-0.5-0.5]) | |||
cylinder(h=0.5,d1=p4baseID,d2=p4baseID+0.5); | |||
translate([-p4baseOD/2,-p4baseOD/2,0]){ | |||
cube([p4baseOD,p4baseOD/2,p4baseH]); | |||
} | } | ||
rotate([0,0,-360/ | rotate([0,0,-360/p4number]){ | ||
translate([- | translate([-p4baseOD/2,0,0]) | ||
cube([ | cube([p4baseOD,p4baseOD/2,p4baseH]); | ||
} | } | ||
// | difference(){ | ||
cylinder(h=p4basegapH,d=p4basegapOD); | |||
cylinder(h=p4basegapH,d=p4basegapID); | |||
} | |||
//mounting holes | |||
for(i=[0:(p2number/p4number)-1]){ | |||
rotate([0,0,(-360/p2number/p2needles*0.5)+(i*-360/p2number)]){ | |||
translate([-(p4baseOD/2)+((p4baseOD-p4baseID)/2),0,p4holeH]) | |||
rotate([0,270,0]) | |||
translate([0,0,0]) | |||
union(){ | |||
cylinder(d1=p2p4flatHD,d2=0,h=(p2p4flatHD/2)/tan(45),$fn=36); | |||
translate([0,0,-(p2p4flatHD)/tan(45)]) | |||
cylinder(d1=p2p4flatHD*3,d2=p2p4flatHD,h=(p2p4flatHD)/tan(45),$fn=36); | |||
cylinder(d=p2p4flatD,h=((p4baseOD-p4baseID)/2)+2,$fn=36); | |||
} | |||
} | |||
} | |||
//second set | |||
for(i=[0:(p2number/p3number)-1]){ | |||
rotate([0,0,-(360/p2number/p2needles*0.5)+(360/p2number/p2needles)+(i*-360/p2number)+(-360/p2number)]){ | |||
translate([-(p4baseOD/2)+((p4baseOD-p4baseID)/2),0,p4holeH]) | |||
rotate([0,270,0]) | |||
translate([0,0,0]) | |||
union(){ | |||
cylinder(d1=p2p4flatHD,d2=0,h=(p2p4flatHD/2)/tan(45),$fn=36); | |||
translate([0,0,-(p2p4flatHD)/tan(45)]) | |||
cylinder(d1=p2p4flatHD*3,d2=p2p4flatHD,h=(p2p4flatHD)/tan(45),$fn=36); | |||
cylinder(d=p2p4flatD,h=((p4baseOD-p4baseID)/2)+2,$fn=36); | |||
} | |||
} | |||
} | |||
//end mounting holes | |||
//trim end | |||
if(p4number>1){ | |||
rotate([0,0,-(360/(p4baseOD*PI/p4endtrim))]) | |||
mirror([1,1,0]) | |||
cube([p4baseOD/2,p4baseOD/2,p4rampH+p4baseH]); | |||
} | |||
} //end main difference | |||
} //end main translate | |||
} //end module | |||
</nowiki> | |||
===CKp5.scad "small bearing holder"=== | |||
[[Image:CKp5.png|400px]] | |||
<nowiki> | |||
include <CKvars.scad>; | |||
CKp5(1); //small bearing holder | |||
module CKp5(B){ | |||
mirror([0,1,0]){ | |||
translate([-(p5wingW+p5bodyW+p5wingW)/2,-p5wingL,0]){ | |||
//bearing | |||
if(B==1){ | |||
translate([((- | translate([(p5wingW+p5bodyW+p5wingW)/2,p5bearingfromwall+(p5wiggleL/2)+p5boltHeadH,bearingholderSmallB2C]) | ||
rotate([270,0,0]) | |||
difference(){ | |||
cylinder(d=bearingholderSmallBOD,h=bearingholderSmallBW, $fn=36); | |||
cylinder(d=bearingholderSmallBID,h=bearingholderSmallBW, $fn=36); | |||
} | |||
translate([(p5wingW+p5bodyW+p5wingW)/2,p5bodyL-p5bearingfromwall-bearingholderSmallBW-(p5wiggleL/2)+p5boltHeadH,bearingholderSmallB2C]) | |||
rotate([270,0,0]) | |||
difference(){ | |||
cylinder(d=bearingholderSmallBOD,h=bearingholderSmallBW, $fn=36); | |||
cylinder(d=bearingholderSmallBID,h=bearingholderSmallBW, $fn=36); | |||
} | |||
//bolt | |||
translate([(p5wingW+p5bodyW+p5wingW)/2,p5boltHeadH,bearingholderSmallB2C]) | |||
rotate([-90,0,0]) | |||
rotate([0,0,360/6/2]) | |||
CKbolt(p5boltD,p5boltL,p5boltHeadH,p5boltHeadOD); | |||
//nut | |||
translate([(p5wingW+p5bodyW+p5wingW)/2,p5bodyL+p5boltHeadH,bearingholderSmallB2C]) | |||
rotate([-90,0,0]) | |||
rotate([0,0,360/6/2]) | |||
CKnut(p5boltD,p5nutH,p5boltHeadOD); | |||
} //end if | |||
difference(){ | |||
union(){ | |||
//wing left | |||
difference(){ | |||
cube([p5wingW,p5wingL,p5wingH]); | |||
//wing left holes | |||
translate([p5wingW/2,p5mounthole2front,0]) | |||
cylinder(d=p5mountholeOD,h=p5wingH+0.1,$fn=36); | |||
translate([p5wingW/2,p5wingL-p5mounthole2back,0]) | |||
cylinder(d=p5mountholeOD,h=p5wingH+0.1,$fn=36); | |||
} //end wing left difference | |||
//body | |||
translate([p5wingW,p5boltHeadH,0]){ | |||
difference(){ | |||
cube([p5bodyW,p5bodyL,p5bodyH]); | |||
// bearing cutout 1 | |||
translate([((p5bodyW)/2)-((bearingholderSmallBOD+p5wiggleW)/2),p5bearingfromwall,0]) | |||
cube([bearingholderSmallBOD+p5wiggleW,bearingholderSmallBW+p5wiggleL,p5bodyH+0.1]); | |||
// bearing cutout 2 | |||
translate([((p5bodyW)/2)-((bearingholderSmallBOD+p5wiggleW)/2),p5bodyL-p5bearingfromwall-(bearingholderSmallBW+p5wiggleL),0]) | |||
cube([bearingholderSmallBOD+p5wiggleW,bearingholderSmallBW+p5wiggleL,p5bodyH+0.1]); | |||
// bore hole cutout | |||
translate([(p5bodyW)/2,-0.1,bearingholderSmallB2C]) | |||
rotate([270,0,0]) | |||
cylinder(d=bearingholderSmallBID,h=p5bodyL+0.2,$fn=36); | |||
} //end body difference | |||
} //end body translate | |||
//wing right | |||
translate([p5wingW+p5bodyW,0,0]){ | |||
difference(){ | |||
cube([p5wingW,p5wingL,p5wingH]); | |||
//wing right holes | |||
translate([p5wingW/2,p5mounthole2front,0]) | |||
cylinder(d=p5mountholeOD,h=p5wingH+0.1,$fn=36); | |||
translate([p5wingW/2,p5wingL-p5mounthole2back,0]) | |||
cylinder(d=p5mountholeOD,h=p5wingH+0.1,$fn=36); | |||
} //end wing right difference | |||
} //end wing right translate | |||
} | |||
difference(){ | |||
translate([(-(((c3OD/2)-p7bearingfromfront-(p7wiggleL/2)-bearingholderZBW))/2)+((p5wingW+p5bodyW+p5wingW)/2),0,0]) | |||
cube([((c3OD/2)-p7bearingfromfront-(p7wiggleL/2)-bearingholderZBW),((c3OD/2)-p7bearingfromfront-(p7wiggleL/2)-bearingholderZBW),p5bodyH]); | |||
translate([(p5wingW+p5bodyW+p5wingW)/2,((c3OD/2)-p7bearingfromfront-(p7wiggleL/2)-bearingholderZBW)/2,0]) | |||
cylinder(d=((c3OD/2)-p7bearingfromfront-(p7wiggleL/2)-bearingholderZBW),h=p5bodyH,$fn=360); | |||
} | |||
}//end body translate | |||
} //end main translate | |||
} //end mirror | |||
} //end main module | |||
module CKbolt(D,BL,HH,HSD){ | |||
cylinder(d=D,h=BL,$fn=32); | |||
fudge = 1/cos(180/(6)); | |||
translate([0,0,-HH]) | |||
rotate([0,0,360/6/2]) | |||
cylinder(h=HH,r=HSD/2*fudge,$fn=(6)); | |||
} | } | ||
// | module CKnut(BD,H,SD){ | ||
fudge = 1/cos(180/(6)); | |||
difference(){ | |||
translate([0,0,0]) | |||
rotate([0,0,360/6/2]) | |||
cylinder(h=H,r=SD/2*fudge,$fn=(6)); | |||
cylinder(d=BD,h=H,$fn=32); | |||
} | |||
} | |||
</nowiki> | |||
===CKp6.scad "big bearing holder"=== | |||
*Depricated | |||
**Replaced with p5 | |||
===CKp7.scad "Z bearing holder"=== | |||
[[Image:CKp7v1803.png|400px]] | |||
*should a horizontal bearing be added to help keep plates aligned? | |||
<nowiki> | |||
include <CKvars.scad>; | |||
rotate([0,90,0]) | |||
CKp7(0); //small bearing holder | |||
module CKp7(B){ | |||
translate([-p7baseW/2,0,0]){ | |||
difference(){ | |||
union(){ | |||
cube([p7baseW,p7baseL,p7baseH]); | |||
cube([p7baseW,p7baseL/2,p7baseH+p7mountnutH]); | |||
translate([0,(p7baseL/2)-(p7wallW/2),0]) | |||
cube([p7baseW,p7wallW,bearingholderZB2C+(p7mountH/2)]); | |||
translate([0,(p7baseL/2)-(p7wallW/2)-p7mountL,bearingholderZB2C-(p7mountH/2)]) | |||
cube([p7baseW,p7mountL,p7mountH]); | |||
//diagnal brace | |||
translate([0,((p7baseL-p7wallW)/2)+p7wallW,p7baseH]){ | |||
difference(){ | |||
cube([p7baseW,(p7baseL-p7wallW)/2,bearingholderZB2C*2/3]); | |||
translate([0,(p7baseL-p7wallW)/2,0]) | |||
rotate([1/tan(((bearingholderZB2C*2/3))/((p7baseL-p7wallW)/2)),0,0]) | |||
cube([p7baseW,bearingholderZB2C*2,bearingholderZB2C*2]); | |||
} //end brace translate | |||
} //end brace difference | |||
} //end main union | |||
//bore hole | |||
translate([(p7baseW)/2,((p7baseL/2)-(p7wallW/2)-p7mountL)-0.1,bearingholderZB2C]) | |||
rotate([270,0,0]) | |||
cylinder(d=bearingholderZBID,h=p7mountL+p7wallW+0.2,$fn=36); | |||
//bearing cutout | |||
translate([((p7baseW)/2)-((bearingholderZBOD+p7wiggleW)/2),(p7baseL/2)-(p7wallW/2)-p7mountL+p7bearingfromfront,bearingholderZB2C-(p7mountH/2)-0.1]) | |||
cube([bearingholderZBOD+p7wiggleW,bearingholderZBW+p7wiggleL,p7mountH+0.2]); | |||
////mount holes | |||
// hole 1 | |||
translate([p7mounthole2edge,p7mounthole2edge,0]) | |||
cylinder(d=p7mountholeOD,h=p7baseH+0.1,$fn=36); | |||
// hole 2 | |||
translate([p7baseW-p7mounthole2edge,p7mounthole2edge,0]) | |||
cylinder(d=p7mountholeOD,h=p7baseH+0.1,$fn=36); | |||
// hole 3 | |||
translate([p7baseW/2,p7baseL-p7mounthole2edge,0]) | |||
cylinder(d=p7mountholeOD,h=p7baseH+0.1,$fn=36); | |||
translate([p7baseW/2,p7baseL-p7mounthole2edge,p7baseH]) | |||
cylinder(d=p7mountholeHeadOD,h=bearingholderZB2C+(p7mountH/2),$fn=36); | |||
// hole 1 hex head | |||
translate([p7mounthole2edge,p7mounthole2edge,p7baseH]) | |||
cylinder(d=p7mountnutOD,h=p7mountnutH+0.1,$fn=6); | |||
// hole 2 hex head | |||
translate([p7baseW-p7mounthole2edge,p7mounthole2edge,p7baseH]) | |||
cylinder(d=p7mountnutOD,h=p7mountnutH+0.1,$fn=6); | |||
// | } //end main difference | ||
//bearing | |||
if(B==1){ | |||
translate([p7baseW/2,p7bearingfromfront+(p7wiggleL/2),bearingholderZB2C]) | |||
rotate([270,0,0]) | |||
difference(){ | |||
cylinder(d=bearingholderSmallBOD,h=bearingholderSmallBW, $fn=36); | |||
cylinder(d=bearingholderSmallBID,h=bearingholderSmallBW, $fn=36); | |||
} | |||
//bolt | |||
translate([p7baseW/2,0,bearingholderZB2C]) | |||
rotate([-90,0,0]) | |||
rotate([0,0,360/6]) | |||
CKbolt(p7boltD,p7boltL,p7boltHeadH,p7boltHeadOD); | |||
//nut | |||
translate([p7baseW/2,((p7baseL-p7wallW)/2)+p7wallW,bearingholderZB2C]) | |||
rotate([-90,0,0]) | |||
rotate([0,0,360/6]) | |||
CKnut(p7boltD,p7nutH,p7boltHeadOD); | |||
} //end if | |||
} //end main translate | |||
} //end main module | |||
module CKbolt(D,BL,HH,HSD){ | |||
cylinder(d=D,h=BL,$fn=32); | |||
fudge = 1/cos(180/(6)); | |||
translate([0,0,-HH]) | |||
rotate([0,0,360/6/2]) | |||
cylinder(h=HH,r=HSD/2*fudge,$fn=(6)); | |||
} | } | ||
module CKnut(BD,H,SD){ | |||
fudge = 1/cos(180/(6)); | |||
difference(){ | |||
translate([0,0,0]) | |||
rotate([0,0,360/6/2]) | |||
cylinder(h=H,r=SD/2*fudge,$fn=(6)); | |||
cylinder(d=BD,h=H,$fn=32); | |||
} | |||
} | } | ||
</nowiki> | |||
translate([((- | |||
===CKp8.scad "plate connector"=== | |||
[[Image:CKp8.png|400px]] | |||
<nowiki> | |||
include <CKvars.scad>; | |||
CKp8(); //small bearing holder | |||
module CKp8(){ | |||
translate([0,0,0]){ | |||
difference(){ | |||
// cube([p8baseW,p8baseL,pPspace2]); | |||
hull(){ | |||
translate([0,p8baseW/2,0]) | |||
cylinder(d=p8baseW,h=p8H,$fn=36); | |||
translate([0,p8baseL-(p8baseW/2),0]) | |||
cylinder(d=p8baseW,h=p8H,$fn=36); | |||
} | |||
translate([0,p8holeend2C,-0.1]) | |||
cylinder(d=p8holeD,h=p8H+0.2,$fn=36); | |||
translate([0,p8baseL-p8holeend2C,-0.1]) | |||
cylinder(d=p8holeD,h=p8H+0.2,$fn=36); | |||
} //end main difference | |||
} //end translate | |||
} //end main module | |||
</nowiki> | |||
===CKp9.scad "outer connector"=== | |||
[[Image:CKp9.png|400px]] | |||
<nowiki> | |||
include <CKvars.scad>; | |||
CKp9(); //small bearing holder | |||
module CKp9(){ | |||
rez=p2number*p2needles*2; | |||
$fn=rez; | |||
translate([-p3wallOD/2,0,0]){ | |||
difference(){ | |||
cylinder(h=p9H,d=p3wallOD+p9thickness); | |||
cylinder(h=p9H,d=p3wallOD); | |||
//first and last holes | |||
rotate([0,0,-(360/p2number/p2needles)*2]){ | |||
translate([(p3wallOD/2)-0.1,0,p9H/2]) | |||
rotate([0,90,0]){ | rotate([0,90,0]){ | ||
#cylinder(h=p9thickness+0.2, d=p2holeD, $fn=18); | |||
} | } | ||
} | } | ||
rotate([0,0, | rotate([0,0,((360/p2number/p2needles)*2)]){ | ||
translate([( | translate([(p3wallOD/2)-0.1,0,p9H/2]) | ||
rotate([0,90,0]){ | rotate([0,90,0]){ | ||
cylinder(h=p9thickness+0.2, d=p2holeD, $fn=18); | |||
} | } | ||
} | } | ||
//end first and last holes | |||
//outer holes | |||
rotate([0,0,(-360/p2number/p2needles)]){ | |||
translate([(p3wallOD/2)-0.1,0,p9H/2]) | |||
rotate([0,90,0]){ | rotate([0,90,0]){ | ||
cylinder(h=p9thickness+0.2, d=p2holeD, $fn=18); | |||
} | } | ||
} | } | ||
rotate([0,0,(360/p2number/p2needles)]){ | |||
translate([(p3wallOD/2)-0.1,0,p9H/2]) | |||
rotate([0,90,0]){ | rotate([0,90,0]){ | ||
cylinder(h=p9thickness+0.2, d=p2holeD, $fn=18); | |||
} | } | ||
} | } | ||
//end outer holes | |||
// cut off ends | |||
rotate([0,0,-((-360/p2number/p2needles)+(1.4*-360/p2number/p2needles))]){ | |||
cube([(p3wallOD+p9thickness)*2,(p3wallOD+p9thickness)*2,(p3wallOD+p9thickness)*2]); | |||
} | |||
rotate([0,0,((-360/p2number/p2needles)+(1.4*-360/p2number/p2needles))]){ | |||
translate([0,-((p3wallOD+p9thickness)*2),0]) | |||
cube([(p3wallOD+p9thickness)*2,(p3wallOD+p9thickness)*2,(p3wallOD+p9thickness)*2]); | |||
} | |||
translate([-((p3wallOD+p9thickness)*2),-((p3wallOD+p9thickness)*2)/2,0]) | |||
#cube([(p3wallOD+p9thickness)*2,(p3wallOD+p9thickness)*2,(p3wallOD+p9thickness)*2]); | |||
} //end main difference | |||
} | } //end translate | ||
} //end main module | |||
} //end module | |||
</nowiki> | </nowiki> | ||
==CKpM.scad "mountain"== | ===CKpM.scad "mountain"=== | ||
[[Image:CKpM.png|400px]] | |||
* | *takes a long time to render, have to be patient, possibly a few hours | ||
*need to | *need to set a minimum thickness of the mountain based on distance between bolt holes | ||
* | *add center inlay groove for middle plate to sit in. hold mountain in place. | ||
*possibly move/change mounting wings from above c2 to sandwich between c2 and c3 with same height as p8 | |||
**would this cause collission with p3 base bolts and pM mount bolts? | |||
[[Image:OSE - OpenKinitic v0318 - mountain groove diagram.png|400px]] | [[Image:OSE - OpenKinitic v0318 - mountain groove diagram.png|400px]] | ||
Line 309: | Line 2,208: | ||
include <CKvars.scad>; | include <CKvars.scad>; | ||
use <mb10.scad>; | |||
use <CKpM2--mountainfeeder.scad>; | |||
use <CKpM3--anglebracket.scad>; | |||
module CKpM(){ | //TO DO// | ||
//*add integrated yarn feeder based on needle height | |||
//*function func6 not right? working with 45 angle but not others | |||
//*pMd4 not placing groove properly when not at 45 degrees | |||
/////// | |||
//values CKpM(X,X,X) defined as follows: | |||
//render needle path groove 1 == yes, 0 == no | |||
//render thread feeder stand using 0=none 1=angle iron 2=makerbeamm | |||
//render beam angle of the feed holder yes == 1, no == 0 | |||
rotate([-90,0,0]) | |||
CKpM(1,0,0); | |||
module CKpM(G,TF,RenderBeam){ | |||
translate([0,-p3wallOD/2,0]){ //main translate | |||
union(){ | |||
difference(){ | |||
translate([0,0,pMH/2]) | |||
//main cube | |||
translate([0,(c2ID+(pMgroove*2)+(pMwallT*2))/4,0]) | |||
cube([c2ID+(pMgroove*2)+(pMwallT*2),(c2ID+(pMgroove*2)+(pMwallT*2))/2,pMH], center=true); | |||
//main ID cut | |||
cylinder(d=pMID,h=pMH+1,$fn=rez); | |||
////// | |||
//angled cut ends | |||
rotate([0,0,atan((((((c2ID+(pMgroove*2)+(pMwallT*2))/2)*cos(90-(pMd1e-pMd0)))+(pMshelfX/2)))/((cos(pMd1e-pMd0)*((pMID/2)+(pMshelfBoltD)+pMgroove))))]) ///////////// | |||
translate([-((pMshelfX)/2),0,0]) | |||
mirror([1,0,0]) | |||
cube([pMID*4,pMID*4,pMH]); | |||
mirror([1,0,0]) | |||
rotate([0,0,atan((((((c2ID+(pMgroove*2)+(pMwallT*2))/2)*cos(90-(pMd1e-pMd0)))+(pMshelfX/2)))/((cos(pMd1e-pMd0)*((pMID/2)+(pMshelfBoltD)+pMgroove))))]) | |||
translate([-((pMshelfX)/2),0,0]) | |||
mirror([1,0,0]) | |||
cube([pMID*4,pMID*4,pMH]); | |||
// | |||
////// | |||
////// | |||
//ends' angled cut with shelf | |||
//rotate([0,0,(pMd1e-pMd0)]) | |||
//mirror([1,0,0]) | |||
// cube([pMID*4,pMID*4,pPspace2+pPplate2]); | |||
//mirror([1,0,0]) | |||
//rotate([0,0,(pMd1e-pMd0)]) | |||
//mirror([1,0,0]) | |||
// cube([pMID*4,pMID*4,pPspace2+pPplate2]); | |||
// | |||
////// | |||
////// | |||
//shelf cuts | |||
translate([((c2ID+(pMgroove*2)+(pMwallT*2))/2)*cos(90-(pMd1e-pMd0)),0,pPspace2]) | |||
cube([pMID*4,pMID*4,pMH]); //c3 above shelf | |||
mirror([1,0,0]) | |||
translate([((c2ID+(pMgroove*2)+(pMwallT*2))/2)*cos(90-(pMd1e-pMd0)),0,pPspace2]) | |||
cube([pMID*4,pMID*4,pMH]); //c3 above shelf | |||
translate([(((c2ID+(pMgroove*2)+(pMwallT*2))/2)*cos(90-(pMd1e-pMd0)))+pMshelfX,0,0]) | |||
cube([pMID*4,pMID*4,pMH]); //of shelf | |||
mirror([1,0,0]) | |||
translate([(((c2ID+(pMgroove*2)+(pMwallT*2))/2)*cos(90-(pMd1e-pMd0)))+pMshelfX,0,0]) | |||
cube([pMID*4,pMID*4,pMH]); //of shelf | |||
//chamfered cut | |||
mirror([1,0,0]) | |||
translate([(((c2ID+(pMgroove*2)+(pMwallT*2))/2)*cos(90-(pMd1e-pMd0)))-pMshelfchamfR,0,pPspace2+pPplate2]) | |||
minkowski(){ | |||
translate([pMshelfchamfR,0,pMshelfchamfR]) | |||
cube([pMID*4,pMID*4,pMH]); | |||
sphere(r=pMshelfchamfR,$fn=100); | |||
} //end minkowski | |||
//chamfered cut | |||
mirror([0,0,0]) | |||
translate([(((c2ID+(pMgroove*2)+(pMwallT*2))/2)*cos(90-(pMd1e-pMd0)))-pMshelfchamfR,0,pPspace2+pPplate2]) | |||
minkowski(){ | |||
translate([pMshelfchamfR,0,pMshelfchamfR]) | |||
cube([pMID*4,pMID*4,pMH]); | |||
sphere(r=pMshelfchamfR,$fn=100); | |||
} //end minkowski | |||
translate([-(cos(45)*((pMshelfX)/2)),sin(45)*((pMshelfX)/2),0]) | |||
translate([0,(cos(pMd1e-pMd0)*((pMID/2)+(pMshelfBoltD)+pMgroove)),0]) | |||
translate([-((((c2ID+(pMgroove*2)+(pMwallT*2))/2)*cos(90-(pMd1e-pMd0)))+(pMshelfX/2)),0,0]) | |||
translate([0,(((((c2ID+(pMgroove*2)+(pMwallT*2))/2)/cos(pMd1e-pMd0))-((pMID/2)+(pMshelfBoltD)+pMgroove))/1.5),0]) | |||
rotate([0,0,-45]) | |||
translate([-pMID/2,0,0]) | |||
cube([pMID,pMID,pMH],center=true); | |||
mirror([1,0,0]) | |||
translate([-(cos(45)*((pMshelfX)/2)),sin(45)*((pMshelfX)/2),0]) | |||
translate([0,(cos(pMd1e-pMd0)*((pMID/2)+(pMshelfBoltD)+pMgroove)),0]) | |||
translate([-((((c2ID+(pMgroove*2)+(pMwallT*2))/2)*cos(90-(pMd1e-pMd0)))+(pMshelfX/2)),0,0]) | |||
translate([0,(((((c2ID+(pMgroove*2)+(pMwallT*2))/2)/cos(pMd1e-pMd0))-((pMID/2)+(pMshelfBoltD)+pMgroove))/1.5),0]) | |||
rotate([0,0,-45]) | |||
translate([-pMID/2,0,0]) | |||
cube([pMID,pMID,pMH],center=true); | |||
//shelf cuts | |||
/////// | |||
////// | |||
//mounting bolt holes | |||
//1 | |||
translate([0,(cos(pMd1e-pMd0)*((pMID/2)+(pMshelfBoltD)+pMgroove)),0]) | |||
translate([-((((c2ID+(pMgroove*2)+(pMwallT*2))/2)*cos(90-(pMd1e-pMd0)))+(pMshelfX/2)),0,0]) | |||
cylinder(d=pMshelfBoltD, h=pMH, $fn=36); | |||
//2 | |||
translate([0,(cos(pMd1e-pMd0)*((pMID/2)+(pMshelfBoltD)+pMgroove)),0]) | |||
translate([-((((c2ID+(pMgroove*2)+(pMwallT*2))/2)*cos(90-(pMd1e-pMd0)))+(pMshelfX/2)),0,0]) | |||
translate([0,(((((c2ID+(pMgroove*2)+(pMwallT*2))/2)/cos(pMd1e-pMd0))-((pMID/2)+(pMshelfBoltD)+pMgroove))/1.5),0]) | |||
cylinder(d=pMshelfBoltD, h=pMH, $fn=36); | |||
mirror([1,0,0]){ | |||
//1 | |||
translate([0,(cos(pMd1e-pMd0)*((pMID/2)+(pMshelfBoltD)+pMgroove)),0]) | |||
translate([-((((c2ID+(pMgroove*2)+(pMwallT*2))/2)*cos(90-(pMd1e-pMd0)))+(pMshelfX/2)),0,0]) | |||
cylinder(d=pMshelfBoltD, h=pMH, $fn=36); | |||
//2 | |||
translate([0,(cos(pMd1e-pMd0)*((pMID/2)+(pMshelfBoltD)+pMgroove)),0]) | |||
translate([-((((c2ID+(pMgroove*2)+(pMwallT*2))/2)*cos(90-(pMd1e-pMd0)))+(pMshelfX/2)),0,0]) | |||
translate([0,(((((c2ID+(pMgroove*2)+(pMwallT*2))/2)/cos(pMd1e-pMd0))-((pMID/2)+(pMshelfBoltD)+pMgroove))/1.5),0]) | |||
cylinder(d=pMshelfBoltD, h=pMH, $fn=36); | |||
} //end mirror | |||
//end of bolt holes | |||
////////////// | |||
///////////////////GROOVE PATH///////// | |||
if(G==1){ | |||
//left needle path cut | |||
needlepathLEFT(); | |||
//right needle path cut | |||
mirror([1,0,0]) | |||
needlepathLEFT(); | |||
} | |||
//////// | |||
//space for smallbearingholder bolt heads | |||
translate([0,((p3baseOD/2)+1),0]){ //close enough? | |||
//smallbearingholder holes | |||
translate([-(p5wingW+p5bodyW+p5wingW)/2,0,0]){ | |||
translate([p5wingW+p5bodyW,0,0]){ | |||
//wing right holes | |||
translate([p5wingW/2,p5mounthole2back,0]) | |||
cylinder(d=p5boltHeadOD,h=p5boltHeadH+0.1,$fn=36); | |||
translate([p5wingW/2,p5wingL-p5mounthole2front,0]) | |||
cylinder(d=p5boltHeadOD,h=p5boltHeadH+0.1,$fn=36); | |||
} //end wing right translate | |||
//wing left holes | |||
translate([p5wingW/2,p5mounthole2back,0]) | |||
cylinder(d=p5boltHeadOD,h=p5boltHeadH+0.1,$fn=36); | |||
translate([p5wingW/2,p5wingL-p5mounthole2front,0]) | |||
cylinder(d=p5boltHeadOD,h=p5boltHeadH+0.1,$fn=36); | |||
}//end translate - center X of holes | |||
}//end translate to ring | |||
//end bearing bolts | |||
//////// | |||
//////// | |||
//hole for optional angle iron thread feeder mount | |||
if(TF==1){ | |||
translate([(((c2ID+(pMgroove*2)+(pMwallT*2))/2)*cos(90-(pMd1e-pMd0)))-pMshelfchamfR,((c2ID+(pMgroove*2)+(pMwallT*2))/2),pPspace2+pPplate2+pMshelfchamfR+(pMH/2)]) | |||
rotate([0,0,45]) | |||
cube([2,2,pMH],center=true); | |||
mirror([1,0,0]) | |||
translate([(((c2ID+(pMgroove*2)+(pMwallT*2))/2)*cos(90-(pMd1e-pMd0)))-pMshelfchamfR,((c2ID+(pMgroove*2)+(pMwallT*2))/2),pPspace2+pPplate2+pMshelfchamfR+(pMH/2)]) | |||
rotate([0,0,45]) | |||
cube([2,2,pMH],center=true); | |||
//translate([sin(pMd4s)*(pMID/2),(pMID/2),pPspace2+pPplate2+(aaX)]) | |||
translate([(((c2ID+(pMgroove*2)+(pMwallT*2))/2)*cos(90-(pMd1e-pMd0)))-pMshelfchamfR-(aaX-aaT)-(aaboltD/2)-1,(c2ID+(pMgroove*2)+(pMwallT*2))/2,(pPspace2+pPplate2+1)+(aaboltHD/2)+bearingholderZBOD]) | |||
rotate([90,0,0]) | |||
cylinder(d=aaboltD,h=(c2ID+(pMgroove*2)+(pMwallT*2))/2,$fn=36); | |||
translate([(((c2ID+(pMgroove*2)+(pMwallT*2))/2)*cos(90-(pMd1e-pMd0)))-pMshelfchamfR-(aaX-aaT)-(aaboltD/2)-1,((c2ID+(pMgroove*2)+(pMwallT*2))/2)-((((pMID/2)-(cos(pMd4s)*(pMID/2)))+pMwallT+pMgroove)-(sin(pMd4s)*(aaboltHD))-2-aaboltHH),(pPspace2+pPplate2+1)+(aaboltHD/2)+bearingholderZBOD]) | |||
rotate([90,0,0]) | |||
#cylinder(d=aaboltHD+0.5,h=(c2ID+(pMgroove*2)+(pMwallT*2))/2,$fn=36); | |||
// | mirror([1,0,0]){ | ||
translate([(((c2ID+(pMgroove*2)+(pMwallT*2))/2)*cos(90-(pMd1e-pMd0)))-pMshelfchamfR-(aaX-aaT)-(aaboltD/2)-1,(c2ID+(pMgroove*2)+(pMwallT*2))/2,(pPspace2+pPplate2+1)+(aaboltHD/2)+bearingholderZBOD]) | |||
rotate([90,0,0]) | |||
cylinder(d=aaboltD,h=(c2ID+(pMgroove*2)+(pMwallT*2))/2,$fn=36); | |||
translate([(((c2ID+(pMgroove*2)+(pMwallT*2))/2)*cos(90-(pMd1e-pMd0)))-pMshelfchamfR-(aaX-aaT)-(aaboltD/2)-1,((c2ID+(pMgroove*2)+(pMwallT*2))/2)-((((pMID/2)-(cos(pMd4s)*(pMID/2)))+pMwallT+pMgroove)-(sin(pMd4s)*(aaboltHD))-2-aaboltHH),(pPspace2+pPplate2+1)+(aaboltHD/2)+bearingholderZBOD]) | |||
rotate([90,0,0]) | |||
cylinder(d=aaboltHD+0.5,h=(c2ID+(pMgroove*2)+(pMwallT*2))/2,$fn=36); | |||
} //end mirror | |||
translate([(((c2ID+(pMgroove*2)+(pMwallT*2))/2)*cos(90-(pMd1e-pMd0)))-pMshelfchamfR-(aaX-aaT)-(aaboltD/2)-1,(c2ID+(pMgroove*2)+(pMwallT*2))/2,pMH-(aaboltHD/2)-5]) | |||
rotate([90,0,0]) | |||
cylinder(d=aaboltD,h=(c2ID+(pMgroove*2)+(pMwallT*2))/2,$fn=36); | |||
translate([(((c2ID+(pMgroove*2)+(pMwallT*2))/2)*cos(90-(pMd1e-pMd0)))-pMshelfchamfR-(aaX-aaT)-(aaboltD/2)-1,((c2ID+(pMgroove*2)+(pMwallT*2))/2)-((((pMID/2)-(cos(pMd4s)*(pMID/2)))+pMwallT+pMgroove)-(sin(pMd4s)*(aaboltHD))-2-aaboltHH),pMH-(aaboltHD/2)-5]) | |||
rotate([90,0,0]) | |||
cylinder(d=aaboltHD+0.5,h=(c2ID+(pMgroove*2)+(pMwallT*2))/2,$fn=36); | |||
mirror([1,0,0]){ | |||
translate([(((c2ID+(pMgroove*2)+(pMwallT*2))/2)*cos(90-(pMd1e-pMd0)))-pMshelfchamfR-(aaX-aaT)-(aaboltD/2)-1,(c2ID+(pMgroove*2)+(pMwallT*2))/2,pMH-(aaboltHD/2)-5]) //X=sin(pMd4s)*(pMID/2) | |||
rotate([90,0,0]) | |||
cylinder(d=aaboltD,h=(c2ID+(pMgroove*2)+(pMwallT*2))/2,$fn=36); | |||
translate([(((c2ID+(pMgroove*2)+(pMwallT*2))/2)*cos(90-(pMd1e-pMd0)))-pMshelfchamfR-(aaX-aaT)-(aaboltD/2)-1,((c2ID+(pMgroove*2)+(pMwallT*2))/2)-((((pMID/2)-(cos(pMd4s)*(pMID/2)))+pMwallT+pMgroove)-(sin(pMd4s)*(aaboltHD))-2-aaboltHH),pMH-(aaboltHD/2)-5]) | |||
rotate([90,0,0]) | |||
cylinder(d=aaboltHD+0.5,h=(c2ID+(pMgroove*2)+(pMwallT*2))/2,$fn=36); | |||
} | |||
} //end if | |||
} //end main body diffference | |||
///////////////////////////// | |||
//////extra piece to square up shape | |||
translate([0,0,pPspace2]){ | |||
difference(){ | |||
translate([0,(c2ID+(pMgroove*2)+(pMwallT*2))/4,((pPplate2+pMextman)/2)]) | |||
cube([c2ID+(pMgroove*2)+(pMwallT*2),(c2ID+(pMgroove*2)+(pMwallT*2))/2,pPplate2+pMextman], center=true); | |||
cylinder(d=pMID,h=pMH,$fn=rez); | |||
//90 degree cut | |||
translate([((c2ID+(pMgroove*2)+(pMwallT*2))/2)*cos(90-(pMd1e-pMd0)),0,0]) | |||
cube([pMID*4,pMID*4,pPplate2+pMextman]); //below shelf | |||
mirror([1,0,0]) | |||
translate([((c2ID+(pMgroove*2)+(pMwallT*2))/2)*cos(90-(pMd1e-pMd0)),0,0]) | |||
cube([pMID*4,pMID*4,pPplate2+pMextman]); //below shelf | |||
//cut to end of groove | |||
difference(){ | |||
rotate([0,0,(pMd1e-pMd0)-pMextman]) | |||
mirror([0,0,0]) | |||
cube([pMID*4,pMID*4,pPplate2+pMextman]); | |||
cube([pMID*4,pMID*4,pPplate2+pMextman]); | |||
} | |||
difference(){ | |||
mirror([1,0,0]) | |||
rotate([0,0,(pMd1e-pMd0)-pMextman]) | |||
mirror([0,0,0]) | |||
cube([pMID*4,pMID*4,pPplate2+pMextman]); | |||
mirror([1,0,0]) | |||
cube([pMID*4,pMID*4,pPplate2+pMextman]); | |||
} | |||
}//end diff | |||
} //end translate | |||
////////end extra piece | |||
//Thread Feeder Stand | |||
if(TF==1){ //angle iron, corner option | |||
translate([(((c2ID+(pMgroove*2)+(pMwallT*2))/2)*cos(90-(pMd1e-pMd0)))-pMshelfchamfR,((c2ID+(pMgroove*2)+(pMwallT*2))/2)-(aaX-aaT),pPspace2+pPplate2]) | |||
cube([aaT,aaX-aaT,pMshelfchamfR]); | |||
mirror([1,0,0]) | |||
translate([(((c2ID+(pMgroove*2)+(pMwallT*2))/2)*cos(90-(pMd1e-pMd0)))-pMshelfchamfR,((c2ID+(pMgroove*2)+(pMwallT*2))/2)-(aaX-aaT),pPspace2+pPplate2]) | |||
cube([aaT,aaX-aaT,pMshelfchamfR]); | |||
CubeChmfD=6; | |||
translate([(((c2ID+(pMgroove*2)+(pMwallT*2))/2)*cos(90-(pMd1e-pMd0)))-pMshelfchamfR-(aaX-aaT),((c2ID+(pMgroove*2)+(pMwallT*2))/2)-(aaX-aaT),pMH]) | |||
difference(){ | |||
translate([0,-(CubeChmfD/2),0]) | |||
cube([aaX-aaT,aaX-aaT+(CubeChmfD/2),aaX+1]); | |||
hull(){ | |||
translate([0,-(CubeChmfD/2),aaX+1]) | |||
rotate([0,90,0]) | |||
cylinder(d=CubeChmfD,h=aaX,$fn=36); | |||
translate([0,-(CubeChmfD/2),(CubeChmfD/2)*1.5]) | |||
rotate([0,90,0]) | |||
resize([CubeChmfD*1.5,CubeChmfD]) | |||
cylinder(d=CubeChmfD,h=aaX,$fn=36); | |||
} //end hull | |||
translate([aaX-aaT,aaX-aaT,(aaX+1)/2]) | |||
rotate([0,0,45]) | |||
cube([2,2,aaX+1],center=true); | |||
translate([0,0,(aaX+1)]) | |||
rotate([0,45,45]) | |||
cube([2,3,3],center=true); | |||
} | |||
mirror([1,0,0]) | |||
translate([(((c2ID+(pMgroove*2)+(pMwallT*2))/2)*cos(90-(pMd1e-pMd0)))-pMshelfchamfR-(aaX-aaT),((c2ID+(pMgroove*2)+(pMwallT*2))/2)-(aaX-aaT),pMH]) | |||
difference(){ | |||
translate([0,-(CubeChmfD/2),0]) | |||
cube([aaX-aaT,aaX-aaT+(CubeChmfD/2),aaX+1]); | |||
hull(){ | |||
translate([0,-(CubeChmfD/2),aaX+1]) | |||
rotate([0,90,0]) | |||
cylinder(d=CubeChmfD,h=aaX,$fn=36); | |||
translate([0,-(CubeChmfD/2),(CubeChmfD/2)*1.5]) | |||
rotate([0,90,0]) | |||
resize([CubeChmfD*1.5,CubeChmfD]) | |||
cylinder(d=CubeChmfD,h=aaX,$fn=36); | |||
} //end hull | |||
translate([aaX-aaT,aaX-aaT,(aaX+1)/2]) | |||
rotate([0,0,45]) | |||
cube([2,2,aaX+1],center=true); | |||
translate([0,0,(aaX+1)]) | |||
rotate([0,45,45]) | |||
cube([2,3,3],center=true); | |||
} | |||
if(RenderBeam==1){ | |||
translate([(((c2ID+(pMgroove*2)+(pMwallT*2))/2)*cos(90-(pMd1e-pMd0)))-pMshelfchamfR-(aaX-aaT),((c2ID+(pMgroove*2)+(pMwallT*2))/2)-(aaX-aaT),pPspace2+pPplate2+pMshelfchamfR]) | |||
difference(){ | |||
cube([aaX,aaX,pMgrooveC3+nA-nC-nB+aaX]); //cube | |||
cube([aaX-aaT,aaX-aaT,pMgrooveC3+nA-nC-nB+aaX]); | |||
// cube([aaX,aaX-aaT,pMH-(pPspace2+pPplate2)]); //manually cut piece | |||
// translate([aaX-aaT,aaX-aaT,0]) | |||
// cube([aaT,aaT,pMH-(pPspace2+pPplate2)]); //manually cut piece | |||
// translate([aaX-aaT,aaX/2,pMH-(pPspace2+pPplate2)+(aaX/2)]) | |||
// rotate([0,90,0]) | |||
// cylinder(d=3,h=aaT,$fn=36); | |||
// translate([aaX/2,aaX,(aaboltHD/2)+bearingholderZBOD]) | |||
// rotate([90,0,0]) | |||
// cylinder(d=3,h=aaT,$fn=36); | |||
//pPspace2+pPplate2+(aaX)]) | |||
//rotate([90,0,0]) | |||
} //end angle iron | |||
mirror(1,0,0) | |||
translate([(((c2ID+(pMgroove*2)+(pMwallT*2))/2)*cos(90-(pMd1e-pMd0)))-pMshelfchamfR-(aaX-aaT),((c2ID+(pMgroove*2)+(pMwallT*2))/2)-(aaX-aaT),pPspace2+pPplate2+pMshelfchamfR]) | |||
difference(){ | |||
cube([aaX,aaX,pMgrooveC3+nA-nC-nB+aaX]); //cube | |||
cube([aaX-aaT,aaX-aaT,pMgrooveC3+nA-nC-nB+aaX]); | |||
} //end angle iron | |||
translate([ | |||
0, | |||
p3wallOD/2, | |||
-nB+(pPspace1+pPplate1+pMgrooveC3-nC-(pMgrooveD-nC))+nA-((tipOpenZ-tipHole)/2)-tipcylD-nG | |||
]) | |||
mirror([0,0,1]) | |||
translate([0,0,tipOpenX/2]) | |||
CKpM2(); | |||
translate([(((c2ID+(pMgroove*2)+(pMwallT*2))/2)*cos(90-(pMd1e-pMd0)))-pMshelfchamfR,((c2ID+(pMgroove*2)+(pMwallT*2))/2),pPspace2+pPplate2+pMshelfchamfR]) | |||
CKpM3(); | |||
mirror([1,0,0]) | |||
translate([(((c2ID+(pMgroove*2)+(pMwallT*2))/2)*cos(90-(pMd1e-pMd0)))-pMshelfchamfR,((c2ID+(pMgroove*2)+(pMwallT*2))/2),pPspace2+pPplate2+pMshelfchamfR]) | |||
CKpM3(); | |||
} //end if render beam | |||
} //end if thread feeder style angle iron | |||
if(TF==2){ //MakerBeam Option | |||
translate([(TFW/2)-(10/2),((c2ID+(pMgroove*2)+(pMwallT*2))/2)+(10/2),0]) | |||
MB10(100); | |||
translate([-(TFW/2)+(10/2),((c2ID+(pMgroove*2)+(pMwallT*2))/2)+(10/2),0]) | |||
MB10(100); | |||
} //end if thread feeder style maker beam | |||
} //end main union | |||
} //end main translate | |||
} //end CKpM module | |||
module needlepathLEFT(){ | |||
/////START GROOVE CUTS///// | |||
//7 | |||
for(i=[pMd7s:gdeg:pMd7e]){ | |||
translate([0,0,pMh7s]) | |||
rotate([270,0,i]) | |||
cylinder($fn=pMcutcylRez,d=pMgrooveD,h=pMgrooveOR); | |||
}//end 7 for | |||
//6 | |||
for(i=[pMd6s:gdeg:pMd6e]){ | |||
translate([0,0,pMh7s+func6(i)]) | |||
rotate([270,0,i]) | |||
cylinder($fn=pMcutcylRez,d=pMgrooveD,h=pMgrooveOR); | |||
}//end 6 for | |||
//5 | |||
for(i=[pMd5s:gdeg:pMd5e]){ | |||
translate([0,0,pMh7s+func6(pMd6e)-(tan(pMcutA)*(i-pMd5s)*glnd)]) /////needs work | |||
rotate([270,0,i]) | |||
cylinder($fn=pMcutcylRez,d=pMgrooveD,h=pMgrooveOR); | |||
}//end 5 for | |||
//4 | |||
for(i=[pMd4s:gdeg:pMd4e]){ | |||
hull(){ | |||
translate([0,0,func4(i)+pMh4e]) | |||
rotate([270,0,i]) | |||
cylinder($fn=pMcutcylRez,d=pMgrooveD,h=pMgrooveOR); | |||
if(i<=pMd5e){ | |||
translate([0,0,pMh7s+func6(pMd6e)-(tan(pMcutA)*(i-pMd5s)*glnd)]) | |||
rotate([270,0,i]) | |||
cylinder($fn=pMcutcylRez,d=pMgrooveD,h=pMgrooveOR); | |||
} | |||
else{ | |||
translate([0,0,0]) | |||
rotate([270,0,i]) | |||
cylinder($fn=pMcutcylRez,d=pMgrooveD,h=pMgrooveOR); | |||
} | |||
} //end hull | |||
}//end 4 for | |||
//3 | |||
for(i=[pMd3s:gdeg:pMd3e]){ | |||
hull(){ | |||
translate([0,0,pMh4e]) | |||
rotate([270,0,i]) | |||
cylinder($fn=pMcutcylRez,d=pMgrooveD,h=pMgrooveOR); | |||
if(i<=pMd5e){ | |||
translate([0,0,pMh7s+func6(pMd6e)-(tan(pMcutA)*(i-pMd5s)*glnd)]) | |||
rotate([270,0,i]) | |||
cylinder($fn=pMcutcylRez,d=pMgrooveD,h=pMgrooveOR); | |||
} | |||
else{ | |||
translate([0,0,0]) | |||
rotate([270,0,i]) | |||
cylinder($fn=pMcutcylRez,d=pMgrooveD,h=pMgrooveOR); | |||
} | |||
} //end hull | |||
}//end 3 for | |||
//2 | |||
for(i=[pMd2s:gdeg:pMd2e]){ | |||
hull(){ | |||
translate([0,0,func2(i)+pMh2s]) | |||
rotate([270,0,i]) | |||
cylinder($fn=pMcutcylRez,d=pMgrooveD,h=pMgrooveOR); | |||
if(i<=pMd5e){ | |||
translate([0,0,pMh7s+func6(pMd6e)-(tan(pMcutA)*(i-pMd5s)*glnd)]) | |||
rotate([270,0,i]) | |||
cylinder($fn=pMcutcylRez,d=pMgrooveD,h=pMgrooveOR); | |||
} //end if | |||
else{ | |||
translate([0,0,0]) | |||
rotate([270,0,i]) | |||
cylinder($fn=pMcutcylRez,d=pMgrooveD,h=pMgrooveOR); | |||
} //end else | |||
} //end hull | |||
}//end 2 for | |||
multrez=10; | |||
//1 | |||
for(i=[pMd1s:gdeg/multrez:pMd1e-(gdeg/2)]){ | |||
hull(){ | |||
translate([0,0,pMh2s+func2(pMd2e)+(tan(pMcutA)*(i-pMd1s)*glnd)]) /////needs work | |||
rotate([270,0,i]) | |||
union(){ | |||
#cylinder($fn=36*2,d=pMgrooveD,h=pMgrooveOR); | |||
translate([-pMgrooveD/2,-pMgrooveD/2,0]) | |||
#cube([pMgrooveD/2,pMgrooveD,pMgrooveOR]); | |||
} | |||
if(i<=pMd5e){ | |||
translate([0,0,pMh7s+func6(pMd6e)-(tan(pMcutA)*(i-pMd5s)*glnd)]) | |||
rotate([270,0,i]) | |||
cylinder($fn=pMcutcylRez,d=pMgrooveD,h=pMgrooveOR); | |||
} //end if | |||
else{ | |||
translate([0,0,0]) | |||
rotate([270,0,i]) | |||
cylinder($fn=pMcutcylRez,d=pMgrooveD,h=pMgrooveOR); | |||
} //end else | |||
}//end hull | |||
}//end 1 for | |||
/* | |||
//0 | |||
for(i=[pMd0s:gdeg:pMd0e]){ | |||
hull(){ | |||
translate([0,0,pMh0s-func0(i)]) | |||
rotate([270,0,i]) | |||
#cylinder($fn=pMcutcylRez,d=pMgrooveD,h=pMgrooveOR); | |||
if(i<=pMd5e){ | |||
translate([0,0,pMh7s+func6(pMd6e)-(tan(pMcutA)*(i-pMd5s)*glnd)]) | |||
rotate([270,0,i]) | |||
cylinder($fn=pMcutcylRez,d=pMgrooveD,h=pMgrooveOR); | |||
} //end if | |||
else{ | |||
translate([0,0,0]) | |||
rotate([270,0,i]) | |||
cylinder($fn=pMcutcylRez,d=pMgrooveD,h=pMgrooveOR); | |||
} //end else | |||
} //end hull | |||
}//end 2 for | |||
*/ | |||
//shelf | |||
for(i=[pMdSs:gdeg/multrez:pMd1e+pMshelfd]){ | |||
rotate([0,0,i]) | |||
translate([0,pMgrooveOR/2,0]) | |||
#cube([pMgrooveD,pMgrooveOR,pPspace2*2],center=true); | |||
}//end 0 for | |||
} //end left needle groove module | |||
</nowiki> | |||
===CKpM2.scad "thread feeder"=== | |||
*directs thread to the needles at the top of the mounatin groove path | |||
<nowiki> | |||
include <CKvars.scad>; | |||
use <CKneedle.scad>; | |||
use <CKpM--mountain.scad>; | |||
use <mb10.scad>; | |||
translate([0,0,-pM2mink/8/2]) | |||
CKpM2(); | |||
/* | |||
translate([0,-p3wallOD/2,0]) //main translate | |||
translate([0,0,-nA]) | |||
translate([0,0,-nB+(pPspace1+pPplate1+pMgrooveC3-nC-(pMgrooveD-nC))]) | |||
rotate([0,0,-90]) | |||
translate([(-p3wallID/2)+(p2needlegrooveDepthslop/2),0,0]) | |||
translate([0,nX/2,0]) | |||
rotate([90,0,0]) | |||
needle(); | |||
*/ | |||
wXtrans=(((c2ID+(pMgroove*2)+(pMwallT*2))/2)*cos(90-(pMd1e-pMd0)))-pMshelfchamfR-(aaX-aaT); //(sin(pMd4s)*(pMID/2))-(aaX/2) | |||
module CKpM2(){ | |||
difference(){ | |||
union(){ | |||
translate([0,-p3wallOD/2,0]){ //main translate | |||
translate([wXtrans,((c2ID+(pMgroove*2)+(pMwallT*2))/2)-(aaX-aaT),0]) | |||
difference(){ | |||
minkowski(){ | |||
union(){ | |||
difference(){ | |||
cube([aaX,aaX,pM2H]); //cube | |||
cube([aaX-aaT,aaX-aaT,pM2H]); | |||
} //end angle iron | |||
translate([0,aaX,0]) | |||
#cube([aaX,aasqNutH+3,pM2H]); | |||
} //end union | |||
sphere(d=pM2mink, $fn=10); //,h=0.01 $fn=72 | |||
} //end minkowski | |||
}//end difference | |||
mirror([1,0,0]) | |||
translate([wXtrans,((c2ID+(pMgroove*2)+(pMwallT*2))/2)-(aaX-aaT),0]) | |||
difference(){ | |||
minkowski(){ | |||
union(){ | |||
difference(){ | |||
cube([aaX,aaX,pM2H]); //cube | |||
cube([aaX-aaT,aaX-aaT,pM2H]); | |||
} //end angle iron | |||
translate([0,aaX,0]) | |||
#cube([aaX,aasqNutH+3,pM2H]); | |||
} //end union | |||
sphere(d=pM2mink, $fn=10); //,h=0.01 $fn=72 | |||
} //end minkowski | |||
}//end difference | |||
minkowski(){ | |||
difference(){ | |||
//main wall between supports | |||
translate([-M2inX/2,((c2ID+(pMgroove*2)+(pMwallT*2))/2)+aaT,pM2mink/2]) | |||
mirror([0,1,0]) | |||
cube([M2inX,M2inY,M2inZ]); | |||
//right side cylinder cut | |||
translate([M2inX/2,M2backwallOD-M2inY,0]) | |||
resize([M2inX-(tipOpenX),(M2inY-aaT)*2]) | |||
cylinder(d=200,h=pM2H,$fn=72); | |||
//left side cylinder cut | |||
mirror([1,0,0]) | |||
translate([M2inX/2,M2backwallOD-M2inY,0]) | |||
resize([M2inX-(tipOpenX),(M2inY-aaT)*2]) | |||
cylinder(d=200,h=pM2H,$fn=72); | |||
//main cylinder cut | |||
translate([0,M2backwallOD,M2inZ]) | |||
rotate([90,0,0]) | |||
resize([M2inX,(M2inZ-tipOpenZ+(pM2mink/2))*2]) | |||
cylinder(d=200,h=M2inY,$fn=72); | |||
//thread entrance cut | |||
translate([0,M2backwallOD-M2inY,0]) | |||
hull(){ | |||
cylinder(d=tipOpenX,h=pM2H); | |||
translate([0,((((((c2ID+(pMgroove*2)+(pMwallT*2))/2))-(p2OD/2)+(tipOpenX/2))*2)/2)/4,0]) | |||
cylinder(d=tipOpenX,h=pM2H,$fn=72); | |||
} | |||
}//end diff | |||
sphere(d=pM2mink,$fn=10); | |||
} //end mink | |||
//tip try 2 | |||
translate([0,M2backwallOD-M2inY,0]){ //(p2OD/2)+(tipOpenX/2) | |||
hull(){ | |||
//right back | |||
translate([tipOpenX/2,0,(tipcylD*1.5/2)]) | |||
cylinder(d=tipcylD*1.5, h=tipOpenZ-(tipcylD*1.5), $fn=36); | |||
//right front | |||
translate([(tipcylD/2)+(tipHole/2),-(tipOpenX/2)+1,(tipOpenX/2)-(nE/2)]) //? | |||
cylinder(d=tipcylD,h=(tipcylD/2)+tipHole+(tipcylD/2),$fn=36); | |||
} | |||
mirror([1,0,0]) | |||
hull(){ | |||
//left back | |||
translate([tipOpenX/2,0,(tipcylD*1.5/2)]) | |||
cylinder(d=tipcylD*1.5, h=tipOpenZ-(tipcylD*1.5), $fn=36); | |||
//left front | |||
translate([(tipcylD/2)+(tipHole/2),-(tipOpenX/2)+1,(tipOpenX/2)-(nE/2)]) | |||
cylinder(d=tipcylD,h=(tipcylD/2)+tipHole+(tipcylD/2),$fn=36); | |||
} | |||
hull(){ | |||
//bottom front | |||
translate([-(tipcylD+tipHole+tipcylD)/2,-(tipOpenX/2)+(tipcylD/2),((tipOpenZ-tipHole)/2)-(tipcylD/2)]) | |||
rotate([0,90,0]) | |||
cylinder(d=tipcylD,h=tipcylD+tipHole+tipcylD,$fn=36); | |||
//center sphere bottom back | |||
translate([cos(90)*((tipOpenX/2)-((pM2mink-tipcylD)/2)),(tipOpenX/2)-(sin(90)*(tipOpenX/2)*0.5),tipcy2D/2]) | |||
translate([0,-tipOpenX/2,0]) | |||
translate([1/4,0,0]) | |||
sphere(d=tipcy2D,$fn=8); | |||
//center sphere bottom back | |||
mirror([1,0,0]) | |||
translate([cos(90)*((tipOpenX/2)-((pM2mink-tipcylD)/2)),(tipOpenX/2)-(sin(90)*(tipOpenX/2)*0.5),tipcy2D/2]) | |||
translate([0,-tipOpenX/2,0]) | |||
translate([1/4,0,0]) | |||
sphere(d=tipcy2D,$fn=8); | |||
} //end full | |||
for(i=[0:90]){ | |||
hull(){ | |||
//bottom back | |||
translate([cos(i)*((tipOpenX/2)-((pM2mink-tipcylD)/2)),(tipOpenX/2)-(sin(i)*(tipOpenX/2)*0.5),tipcy2D/2]) | |||
translate([0,-tipOpenX/2,0]) | |||
translate([1/4,0,0]) | |||
sphere(d=tipcy2D,$fn=8); | |||
//bottom front | |||
translate([((tipcylD+tipHole+tipcylD)/2)-0.1,-(tipOpenX/2)+(tipcylD/2),((tipOpenZ-tipHole)/2)-(tipcylD/2)]) | |||
rotate([0,90,0]) | |||
cylinder(d=tipcylD,h=0.1,$fn=36); //change from nG to something else? | |||
} //end hull | |||
} //end for | |||
mirror([1,0,0]) | |||
for(i=[0:90]){ | |||
hull(){ | |||
//bottom back | |||
translate([cos(i)*((tipOpenX/2)-((pM2mink-tipcylD)/2)),(tipOpenX/2)-(sin(i)*(tipOpenX/2)*0.5),tipcy2D/2]) | |||
translate([0,-tipOpenX/2,0]) | |||
translate([1/4,0,0]) | |||
sphere(d=tipcy2D,$fn=8); | |||
//bottom front | |||
translate([((tipcylD+tipHole+tipcylD)/2)-0.1,-(tipOpenX/2)+(tipcylD/2),((tipOpenZ-tipHole)/2)-(tipcylD/2)]) | |||
rotate([0,90,0]) | |||
cylinder(d=tipcylD,h=0.1,$fn=36); //change from nG to something else? | |||
} //end hull | |||
} //end for | |||
hull(){ | |||
//top front | |||
translate([-(tipcylD+tipHole+tipcylD)/2,-(tipOpenX/2)+(tipcylD/2),tipOpenZ-((tipOpenZ-tipHole)/2)+(tipcylD/2)]) | |||
rotate([0,90,0]) | |||
cylinder(d=tipcylD,h=tipcylD+tipHole+tipcylD,$fn=36); //change from nG to something else? | |||
//center sphere top back | |||
translate([cos(90)*((tipOpenX/2)-((pM2mink-tipcylD)/2)),(tipOpenX/2)-(sin(90)*(tipOpenX/2)*0.5),-tipcy2D/2]) | |||
translate([0,-tipOpenX/2,tipOpenZ]) | |||
translate([1/4,0,0]) | |||
sphere(d=tipcy2D,$fn=18); | |||
//center sphere top back | |||
mirror([1,0,0]) | |||
translate([cos(90)*((tipOpenX/2)-((pM2mink-tipcylD)/2)),(tipOpenX/2)-(sin(90)*(tipOpenX/2)*0.5),-tipcy2D/2]) | |||
translate([0,-tipOpenX/2,tipOpenZ]) | |||
translate([1/4,0,0]) | |||
sphere(d=tipcy2D,$fn=18); | |||
} //end full | |||
for(i=[0:90]){ | |||
hull(){ | |||
//top back | |||
translate([cos(i)*((tipOpenX/2)-((pM2mink-tipcylD)/2)),(tipOpenX/2)-(sin(i)*(tipOpenX/2)*0.5),-tipcy2D/2]) | |||
translate([0,-tipOpenX/2,tipOpenZ]) | |||
translate([1/4,0,0]) | |||
sphere(d=tipcy2D,$fn=18); | |||
//top front | |||
translate([((tipcylD+tipHole+tipcylD)/2)-0.1,-(tipOpenX/2)+(tipcylD/2),tipOpenZ-((tipOpenZ-tipHole)/2)+(tipcylD/2)]) | |||
rotate([0,90,0]) | |||
cylinder(d=tipcylD,h=0.1,$fn=36); //change from nG to something else? | |||
} //end hull | |||
} //end for | |||
mirror([1,0,0]) | |||
for(i=[0:90]){ | |||
hull(){ | |||
//top back | |||
translate([cos(i)*((tipOpenX/2)-((pM2mink-tipcylD)/2)),(tipOpenX/2)-(sin(i)*(tipOpenX/2)*0.5),-tipcy2D/2]) | |||
translate([0,-tipOpenX/2,tipOpenZ]) | |||
translate([1/4,0,0]) | |||
sphere(d=tipcy2D,$fn=18); | |||
//top front | |||
translate([((tipcylD+tipHole+tipcylD)/2)-0.1,-(tipOpenX/2)+(tipcylD/2),tipOpenZ-((tipOpenZ-tipHole)/2)+(tipcylD/2)]) | |||
rotate([0,90,0]) | |||
cylinder(d=tipcylD,h=0.1,$fn=36); //change from nG to something else? | |||
} //end hull | |||
} //end for | |||
hull(){ | |||
translate([cos(0)*((tipOpenX/2)-((pM2mink-tipcylD)/2)),(tipOpenX/2)-(sin(0)*(tipOpenX/2)*0.5),-tipcy2D/2]) | |||
translate([0,-tipOpenX/2,tipOpenZ]) | |||
translate([1/4,0,0]) | |||
sphere(d=tipcy2D,$fn=18); | |||
translate([tipOpenX/2,((((((c2ID+(pMgroove*2)+(pMwallT*2))/2))-(p2OD/2)+(tipOpenX/2))*2)/2)/4,tipOpenZ-(pM2mink/2)]) | |||
sphere(d=pM2mink,$fn=10); | |||
} | |||
mirror([1,0,0]) | |||
hull(){ | |||
translate([cos(0)*((tipOpenX/2)-((pM2mink-tipcylD)/2)),(tipOpenX/2)-(sin(0)*(tipOpenX/2)*0.5),-tipcy2D/2]) | |||
translate([0,-tipOpenX/2,tipOpenZ]) | |||
translate([1/4,0,0]) | |||
sphere(d=tipcy2D,$fn=18); | |||
translate([tipOpenX/2,((((((c2ID+(pMgroove*2)+(pMwallT*2))/2))-(p2OD/2)+(tipOpenX/2))*2)/2)/4,tipOpenZ-(pM2mink/2)]) | |||
sphere(d=pM2mink,$fn=10); | |||
} | |||
//bottom fade to wall | |||
hull(){ | |||
translate([cos(0)*((tipOpenX/2)-((pM2mink-tipcylD)/2)),(tipOpenX/2)-(sin(0)*(tipOpenX/2)*0.5),tipcy2D/2]) | |||
translate([0,-tipOpenX/2,0]) | |||
translate([1/4,0,0]) | |||
sphere(d=tipcy2D,$fn=8); | |||
translate([tipOpenX/2,((((((c2ID+(pMgroove*2)+(pMwallT*2))/2))-(p2OD/2)+(tipOpenX/2))*2)/2)/4,(pM2mink/2)]) | |||
sphere(d=pM2mink,$fn=10); | |||
} | |||
mirror([1,0,0]) | |||
hull(){ | |||
translate([cos(0)*((tipOpenX/2)-((pM2mink-tipcylD)/2)),(tipOpenX/2)-(sin(0)*(tipOpenX/2)*0.5),tipcy2D/2]) | |||
translate([0,-tipOpenX/2,0]) | |||
translate([1/4,0,0]) | |||
sphere(d=tipcy2D,$fn=8); | |||
translate([tipOpenX/2,((((((c2ID+(pMgroove*2)+(pMwallT*2))/2))-(p2OD/2)+(tipOpenX/2))*2)/2)/4,(pM2mink/2)]) | |||
sphere(d=pM2mink,$fn=10); | |||
} | |||
} //end tip translate | |||
//end tip try 2 | |||
} //end translate | |||
} //end main union | |||
//cut slot for angle iron in sliding section | |||
translate([0,-p3wallOD/2,]){ | |||
translate([wXtrans,((c2ID+(pMgroove*2)+(pMwallT*2))/2)-(aaX-aaT),0]){ | |||
translate([-pM2mink,-pM2mink,pM2H]) | |||
# cube([aaX+(3*2),aaX+(3*2),pM2mink]); //cube | |||
translate([-(pM2slop/2),-(pM2slop/2),0]) | |||
difference(){ | |||
cube([aaX+(pM2slop),aaX+(pM2slop),pM2H]); //cube | |||
cube([aaX-aaT-(pM2slop/4),aaX-aaT-(pM2slop/4),pM2H]); | |||
} | |||
translate([(aaX/2)-((aasqNutW+NEMAsqNutSlop)/2),aaX,0]) | |||
#cube([aasqNutW+NEMAsqNutSlop,aasqNutH+NEMAsqNutSlop,aasqNutW+NEMAsqNutSlop+2]); | |||
translate([(aaX/2),aaX,2+(aasqNutW+NEMAsqNutSlop)/2]) | |||
rotate([270,0,0]) | |||
#cylinder(d=aaboltD,h=aaX,$fn=36); | |||
translate([0,0,pM2H]) | |||
mirror([0,0,1]){ | |||
translate([(aaX/2)-((aasqNutW+NEMAsqNutSlop)/2),aaX,0]) | |||
#cube([aasqNutW+NEMAsqNutSlop,aasqNutH+NEMAsqNutSlop,aasqNutW+NEMAsqNutSlop+2]); | |||
translate([(aaX/2),aaX,2+(aasqNutW+NEMAsqNutSlop)/2]) | |||
rotate([270,0,0]) | |||
#cylinder(d=aaboltD,h=aaX,$fn=36); | |||
} | |||
} //end difference | |||
mirror([1,0,0]) | |||
translate([wXtrans,((c2ID+(pMgroove*2)+(pMwallT*2))/2)-(aaX-aaT),0]){ | |||
translate([-pM2mink,-pM2mink,pM2H]) | |||
# cube([aaX+(3*2),aaX+(3*2),pM2mink]); //cube | |||
translate([-(pM2slop/2),-(pM2slop/2),0]) | |||
difference(){ | |||
cube([aaX+(pM2slop),aaX+(pM2slop),pM2H]); //cube | |||
cube([aaX-aaT-(pM2slop/4),aaX-aaT-(pM2slop/4),pM2H]); | |||
} | |||
translate([(aaX/2)-((aasqNutW+NEMAsqNutSlop)/2),aaX,0]) | |||
#cube([aasqNutW+NEMAsqNutSlop,aasqNutH+NEMAsqNutSlop,aasqNutW+NEMAsqNutSlop+2]); | |||
translate([(aaX/2),aaX,2+(aasqNutW+NEMAsqNutSlop)/2]) | |||
rotate([270,0,0]) | |||
#cylinder(d=aaboltD,h=aaX,$fn=36); | |||
translate([0,0,pM2H]) | |||
mirror([0,0,1]){ | |||
translate([(aaX/2)-((aasqNutW+NEMAsqNutSlop)/2),aaX,0]) | |||
#cube([aasqNutW+NEMAsqNutSlop,aasqNutH+NEMAsqNutSlop,aasqNutW+NEMAsqNutSlop+2]); | |||
translate([(aaX/2),aaX,2+(aasqNutW+NEMAsqNutSlop)/2]) | |||
rotate([270,0,0]) | |||
#cylinder(d=aaboltD,h=aaX,$fn=36); | |||
} | |||
} //end difference | |||
} //end cut translate | |||
translate([-M2inX*2,-M2inY*2,pM2mink/8/2]) | |||
mirror([0,0,1]) | |||
cube([M2inX*4,M2inY*4,pM2mink]); | |||
translate([-M2inX*2,-M2inY*2,pM2H]) | |||
cube([M2inX*4,M2inY*4,pM2mink]); | |||
} //end main difference | |||
} //end module | |||
</nowiki> | |||
===CKpM3.scad "angle bracket"=== | |||
[[Image:CKpM3.png|400px]] | |||
*holds angle iron into corner | |||
*need to redo larger radius to take into account aaT | |||
<nowiki> | |||
include <CKvars.scad>; | |||
CKpM3(); | |||
module CKpM3(){ | |||
mirror([0,1,0]) | |||
mirror([1,0,0]) | |||
difference(){ | |||
hull(){ | |||
pM3profile(pM3c2e+pM3c2c+pM3c2e,0.5); | |||
translate([0,0,pM3c2e+aaboltD]) | |||
pM3profile(pM3c2c-(aaboltD*2),pM3mink); | |||
} | |||
translate([-aaT/3,-aaT/3,0]) | |||
cube([(aaboltD*3)+aaX+pM3mink,aaX+pM3mink,pM3H]); //cube | |||
translate([-aaT,-aaT,0]) | |||
cube([aaX+pM3slop/2,aaX+pM3slop/2,pM3H]); //cube | |||
translate([-(-(aaX-aaT)-(aaboltD/2)-1),0,pM3c2e]) | |||
rotate([90,0,0]) | |||
cylinder(d=aaboltD,h=aaX,$fn=36); | |||
translate([-(-(aaX-aaT)-(aaboltD/2)-1),0,pM3c2e+pM3c2c]) | |||
rotate([90,0,0]) | |||
cylinder(d=aaboltD,h=aaX,$fn=36); | |||
} //end diff | |||
} //end module | |||
module pM3profile(h,c){ | |||
RM=pM3mink/2; //constant = r of minkoswki | |||
RrD=c; //distance from corner = c | |||
RrC=(RM*RM)-((RrD/2)*(RrD/2)); //distance from corner //cos(45)*aaT ?? | |||
RtX=((sqrt(2))*(sqrt((RM*RM)+(RrC*RrC)+(2*RM*RrC))))-RM-RrC; | |||
RrR=RtX+RM; | |||
difference(){ | difference(){ | ||
minkowski(){ | |||
difference(){ | |||
cylinder($fn= | translate([-aaT,-aaT,0]) | ||
cube([(aaboltD*3)+aaX,aaX,h]); //cube | |||
cube([(aaboltD*3)+aaX-aaT,aaX-aaT,h]); | |||
} | |||
cylinder(d=pM3mink, h=0.01, $fn=36); //,h=0.01 $fn=72 | |||
} //end mink | |||
translate([-aaT/3,-aaT/3,0]) | |||
cube([(aaboltD*3)+aaX+pM3mink,aaX+pM3mink,h]); //cube | |||
translate([0,0,h-0.011]) | |||
minkowski(){ | |||
difference(){ | |||
translate([-aaT,-aaT,0]) | |||
cube([(aaboltD*3)+aaX,aaX,h]); //cube | |||
cube([(aaboltD*3)+aaX-aaT,aaX-aaT,h]); | |||
} | |||
cylinder(d=pM3mink, h=0.01, $fn=36); //,h=0.01 $fn=72 | |||
} //end mink | |||
difference(){ | |||
translate([-aaT,-aaT,0]) | |||
cube([aaX+pM3slop/2,aaX+pM3slop/2,h]); //cube | |||
} | |||
//cornercut | |||
translate([0,0,0]) | |||
intersection(){ | |||
translate([-aaT+RtX-(RtX+RM),-aaT+RtX-(RtX+RM),0]) | |||
#cube([RtX+RM,RtX+RM,h]); | |||
translate([-aaT+RtX,-aaT+RtX,0]) | |||
difference(){ | |||
cylinder(r=RrR+20, h=h, $fn=18); | |||
cylinder(r=RrR, h=h+1, $fn=36); | |||
} | |||
} //end intersection | |||
} //end diff | |||
} //end module | |||
</nowiki> | |||
==2D Cuts== | |||
*Parts to be cut out using a CNC machine | |||
===CKc1.scad=== | |||
[[Image:CKc1.png|400px]] | |||
<nowiki> | |||
include <CKvars.scad>; | |||
use <CKc2--bottom_surface_motor_gears.scad>; | |||
use <CKp1--motor_gear.scad>; | |||
////TODO | |||
//move Z mounts to corners | |||
//place a Z next to stepper, or on either side | |||
//need to reduce to 380 OD width side to side | |||
//need to reduce wasted space around the edges | |||
projection(cut = false) | |||
translate([c1W/2,0,0]) | |||
CKc1(); | |||
/* | |||
translate([(c1OD/2),0,c1H+1]) | |||
rotate([0,0,0]) | |||
translate([-(CKp1_pitch_radius+CKc2_pitch_radius),0,0]) | |||
CKp1(); | |||
*/ | |||
//need to make first Z mount less than 45 if there is room | |||
//make sure to update full assembly | |||
//((p3baseOD/2)+1+((p5wingL)-(p5bearingfromwall+(p5wiggleL/2)+p5boltHeadH)))*2; //length to outside of outter bearing | |||
module CKc1(){ | |||
echo("c2c of gears",CKp1_pitch_radius+CKc2_pitch_radius); | |||
rez=p2number*p2needles*2; //calculate desired rezolution | |||
$fn=rez; //defines resolution of circles. | |||
translate([0,0,0]){ | |||
difference(){ | |||
translate([-c1W/2,-c1OD/2,0]) | |||
cube([c1W,c1OD,c1H]); | |||
/* | |||
// union(){ | |||
//octogon | |||
difference(){ | |||
translate([-c1zOD/2,-c1zOD/2,0]) | |||
cube([c1zOD,c1zOD,c1H]); //use C1OD stepper side, use new number for Z side | |||
for(i=[2:8]){ | |||
rotate([0,0,(45*i)+90]) | |||
translate([c1zOD/2,-c1zOD/2,0]) | |||
#cube([c1zOD,c1zOD,c1H]); | |||
} | |||
for(i=[1]){ | |||
rotate([0,0,(45*i)+90]) | |||
translate([c1OD/2,-c1OD/2,0]) | |||
#cube([c1OD,c1OD,c1H]); | |||
} | |||
} //end diff | |||
*/ | |||
// fudge = 1/cos(180/(8)); | |||
// rotate([0,0,360/8/2]) | |||
// cylinder(h=c1H,r=(c1OD/2)*fudge,$fn=(8)); | |||
// cylinder(h=c1H,d=c1OD); | |||
// } //end main union | |||
// | cylinder(h=c1H+2,d=p3baseID); // donut hole | ||
for(i=[ | |||
//base needle holes | |||
////should these be circles instead? easier to cut? slot with rounded ends? | |||
for(i=[1:p2needles*p2number]){ | |||
rotate([0,0,(360/p2number/p2needles/2)-(360/p2number/p2needles*i)]){ | |||
translate([-p2OD/2,-needleWidth/2,-0.01]) | |||
{ | |||
cube([p2needlegrooveDepth,needleWidth,p3wallH+0.02]); | |||
translate([0,needleWidth/2,0]) | |||
cylinder(h=c1H+2,d=needleWidth,$fn=36); | |||
translate([p2needlegrooveDepth,needleWidth/2,0]) | |||
cylinder(h=c1H+2,d=needleWidth,$fn=36); | |||
} | |||
} //end rotate | |||
} //end for | |||
//base mounting holes | |||
//p3 - "outer" holes | |||
}//end | for(i=[1:p3baseholenumber*p3number]){ | ||
rotate([0,0,(((360/p3number/p3baseholenumber))/2)-((360/p3number/p3baseholenumber)*i)]){ | |||
}//end | translate([-(p3baseOD/2)+p3baseholefromODID,0,0]) | ||
cylinder(h=c1H+2,d=p3baseholeD,$fn=18); | |||
} //end rotate | |||
} //end outer hole set for | |||
//Z bearing mount holes | |||
for(i=[0:(p7number/2)-1]){ | |||
rotate([0,0,45-((90/((p7number/2)-1))*i)]){ | |||
translate([0,(c3OD/2)-p7bearingfromfront-(p7wiggleL/2)-bearingholderZBW,0]){ | |||
translate([-p7baseW/2,0,0]){ | |||
// hole 1 | |||
translate([p7mounthole2edge,p7mounthole2edge,0]) | |||
cylinder(d=p7mountholeOD,h=c1H+0.1,$fn=36); | |||
// hole 2 | |||
translate([p7baseW-p7mounthole2edge,p7mounthole2edge,0]) | |||
cylinder(d=p7mountholeOD,h=c1H+0.1,$fn=36); | |||
// hole 3 | |||
translate([p7baseW/2,p7baseL-p7mounthole2edge,0]) | |||
cylinder(d=p7mountholeOD,h=c1H+0.1,$fn=36); | |||
}//end translate | |||
}//end translate | |||
}//end rotate | |||
}//end for | |||
mirror([0,1,0]) | |||
for(i=[0:(p7number/2)-1]){ | |||
rotate([0,0,45-((90/((p7number/2)-1))*i)]){ | |||
translate([0,(c3OD/2)-p7bearingfromfront-(p7wiggleL/2)-bearingholderZBW,0]){ //close enough? | |||
translate([-p7baseW/2,0,0]){ | |||
// hole 1 | |||
translate([p7mounthole2edge,p7mounthole2edge,0]) | |||
cylinder(d=p7mountholeOD,h=c1H+0.1,$fn=36); | |||
// hole 2 | |||
translate([p7baseW-p7mounthole2edge,p7mounthole2edge,0]) | |||
cylinder(d=p7mountholeOD,h=c1H+0.1,$fn=36); | |||
// hole 3 | |||
translate([p7baseW/2,p7baseL-p7mounthole2edge,0]) | |||
cylinder(d=p7mountholeOD,h=c1H+0.1,$fn=36); | |||
}//end translate | |||
}//end translate | |||
}//end rotate | |||
}//end for | |||
//Stepper Mount | |||
for(i=[1:c1steppersnumber]){ | |||
rotate([0,0,((360/c1steppersnumber)*i)-(90)]) | |||
translate([-(CKp1_pitch_radius+CKc2_pitch_radius),0,0]){ | |||
cylinder(d=NEMAfaceCricOD+0.25,h=c1H); | |||
translate([NEMAboltDis/2,NEMAboltDis/2,0]) | |||
cylinder(d=NEMAboltOD,h=c1H); | |||
translate([-NEMAboltDis/2,NEMAboltDis/2,0]) | |||
cylinder(d=NEMAboltOD,h=c1H); | |||
translate([NEMAboltDis/2,-NEMAboltDis/2,0]) | |||
cylinder(d=NEMAboltOD,h=c1H); | |||
translate([-NEMAboltDis/2,-NEMAboltDis/2,0]) | |||
cylinder(d=NEMAboltOD,h=c1H); | |||
} | |||
} | |||
//mounting wood beams | |||
for(i=[1:4]){ | |||
translate([(((c1W+(c1W/5))/5)*i)-((c1W+(c1W/5))/2),-(c1OD/2)+(woodbeamW/2),0]) | |||
cylinder(d=woodbeamScrewOD,h=c1H); | |||
} | |||
mirror([0,1,0]) | |||
for(i=[1:4]){ | |||
translate([(((c1W+(c1W/5))/5)*i)-((c1W+(c1W/5))/2),-(c1OD/2)+(woodbeamW/2),0]) | |||
cylinder(d=woodbeamScrewOD,h=c1H); | |||
} | |||
for(i=[1:2]){ | |||
translate([(c1W/2)-(woodbeamW/2),-(((c1W+(c1W/5))/5)*i)+((c1OD+(c1W/5))/2),0]) | |||
cylinder(d=woodbeamScrewOD,h=c1H); | |||
} | |||
mirror([1,0,0]) | |||
for(i=[1:2]){ | |||
translate([(c1W/2)-(woodbeamW/2),-(((c1W+(c1W/5))/5)*i)+((c1OD+(c1W/5))/2),0]) | |||
cylinder(d=woodbeamScrewOD,h=c1H); | |||
} | |||
mirror([0,1,0]){ | |||
for(i=[1:2]){ | |||
translate([(c1W/2)-(woodbeamW/2),-(((c1W+(c1W/5))/5)*i)+((c1OD+(c1W/5))/2),0]) | |||
cylinder(d=woodbeamScrewOD,h=c1H); | |||
} | |||
mirror([1,0,0]) | |||
for(i=[1:2]){ | |||
translate([(c1W/2)-(woodbeamW/2),-(((c1W+(c1W/5))/5)*i)+((c1OD+(c1W/5))/2),0]) | |||
cylinder(d=woodbeamScrewOD,h=c1H); | |||
} | |||
} | |||
/* | |||
for(i=[1:7]){ | |||
rotate([0,0,(360/8*i)-45]){ | |||
translate([-(c1zOD/2)+(woodbeamW/2),0,0]) | |||
cylinder(d=woodbeamScrewOD,h=c1H); | |||
translate([-(c1zOD/2)+(woodbeamW/2),tan(360/8/2)*(-(c1zOD/2)+(woodbeamW/2))+(woodbeamW),0]) | |||
cylinder(d=woodbeamScrewOD,h=c1H); | |||
translate([-(c1zOD/2)+(woodbeamW/2),tan(360/8/2)*((c1zOD/2)-(woodbeamW/2))-(woodbeamW),0]) | |||
cylinder(d=woodbeamScrewOD,h=c1H); | |||
} //end rotate | |||
} //end for | |||
*/ | |||
} //end main difference | |||
} //end main translate | |||
} //end CKc1 module | |||
</nowiki> | |||
===CKc2.scad "geared plate"=== | |||
[[Image:CKc2.png|400px]] | |||
*Need to update depricated commands: | |||
*:DEPRECATED: child() will be removed in future releases. Use children() instead. | |||
*:DEPRECATED: The assign() module will be removed in future releases. Use a regular assignment instead. | |||
Number of Teeth = Floor( ((-2*OutsideDiameter)/(PitchDiameter-OutsideDiameter)) -2 ) | |||
Circular Pitch = 180 * PitchDiameter / Number of Teether | |||
<nowiki> | |||
include <CKvars.scad>; | |||
use <CKpM--mountain.scad> | |||
use <CKc3--topplate.scad> | |||
rez=p2number*p2needles*2; //calculate desired rezolution | |||
$fn=rez; //defines resolution of circles. | |||
pi=3.1415926535897932384626433832795; | |||
//c3 for review | |||
//translate([0,0,10]) | |||
//CKc3(); | |||
/* | |||
translate([0,-c3OD/2,0]) | |||
translate([0,p3wallOD/2,c2H]) | |||
CKpM(0); | |||
*/ | |||
projection(cut = false) | |||
CKc2(); | |||
module CKc2(){ | |||
translate([0,-c3OD/2,0]){ | |||
rotate([0,0,-((360/c2connectors))]) | |||
difference(){ | |||
gear (circular_pitch=pCir, | |||
gear_thickness = c2H, | |||
rim_thickness = c2H, | |||
hub_thickness = c2H, | |||
circles=0); | |||
cylinder(h=c2H+2,d=c3ID); // donut hole | |||
//calculate number of holes to skip in for() using arc of mountain? | |||
//plate connector holes | |||
for(i=[2:c2connectors]){ | |||
rotate([0,0,((360/c2connectors)*i)]){ | |||
translate([0,p8innerboltO2C,-0.1]) | |||
cylinder(d=p8holeD,h=c2H+0.2,$fn=36); | |||
translate([0,p8outerboltO2C,-0.1]) | |||
cylinder(d=p8holeD,h=c2H+0.2,$fn=36); | |||
} //end rotate i | |||
} //end for | |||
//small bearing holder | |||
for(i=[1:c2bmounts]){ | |||
rotate([0,0,-((360/c2connectors)/2)+((360/c2bmounts)*i)]){ | |||
translate([0,((p3baseOD/2)+1),0]){ | |||
//smallbearingholder holes | |||
translate([-(p5wingW+p5bodyW+p5wingW)/2,0,0]){ | |||
translate([p5wingW+p5bodyW,0,0]){ | |||
//wing right holes | |||
translate([p5wingW/2,p5mounthole2back,0]) | |||
cylinder(d=p5mountholeOD,h=c2H+0.1,$fn=36); | |||
translate([p5wingW/2,p5wingL-p5mounthole2front,0]) | |||
cylinder(d=p5mountholeOD,h=c2H+0.1,$fn=36); | |||
} //end wing right translate | |||
//wing left holes | |||
translate([p5wingW/2,p5mounthole2back,0]) | |||
cylinder(d=p5mountholeOD,h=c2H+0.1,$fn=36); | |||
translate([p5wingW/2,p5wingL-p5mounthole2front,0]) | |||
cylinder(d=p5mountholeOD,h=c2H+0.1,$fn=36); | |||
}//end translate - center X of holes | |||
}//end translate to ring | |||
}//end for rotate | |||
}//end small bearing holder for | |||
//small bearing holder - under mountain | |||
rotate([0,0,((360/c2connectors))]){ | |||
translate([0,(p3baseOD/2)+1,0]){ //close enough? | |||
//smallbearingholder holes | |||
// | translate([-(p5wingW+p5bodyW+p5wingW)/2,0,0]){ | ||
translate([0,0, | translate([p5wingW+p5bodyW,0,0]){ | ||
//wing right holes | |||
translate([p5wingW/2,p5mounthole2back,0]) | |||
cylinder(d=p5mountholeOD,h=c2H+0.1,$fn=36); | |||
translate([p5wingW/2,p5wingL-p5mounthole2front,0]) | |||
rotate( | cylinder(d=p5mountholeOD,h=c2H+0.1,$fn=36); | ||
} //end wing right translate | |||
//wing left holes | |||
translate([p5wingW/2,p5mounthole2back,0]) | |||
cylinder(d=p5mountholeOD,h=c2H+0.1,$fn=36); | |||
translate([p5wingW/2,p5wingL-p5mounthole2front,0]) | |||
cylinder(d=p5mountholeOD,h=c2H+0.1,$fn=36); | |||
}//end translate - center X of holes | |||
}//end translate to ring | |||
}//end rotate mountain bearing | |||
////// | |||
//mounting bolt holes | |||
rotate([0,0,((360/c2connectors))]){ | |||
//1 | |||
translate([0,(cos(pMd1e-pMd0)*((pMID/2)+(pMshelfBoltD)+pMgroove)),0]) | |||
translate([-((((c2ID+(pMgroove*2)+(pMwallT*2))/2)*cos(90-(pMd1e-pMd0)))+(pMshelfX/2)),0,0]) | |||
cylinder(d=pMshelfBoltD, h=pMH, $fn=36); | |||
//2 | |||
translate([0,(cos(pMd1e-pMd0)*((pMID/2)+(pMshelfBoltD)+pMgroove)),0]) | |||
translate([-((((c2ID+(pMgroove*2)+(pMwallT*2))/2)*cos(90-(pMd1e-pMd0)))+(pMshelfX/2)),0,0]) | |||
translate([0,(((((c2ID+(pMgroove*2)+(pMwallT*2))/2)/cos(pMd1e-pMd0))-((pMID/2)+(pMshelfBoltD)+pMgroove))/1.5),0]) | |||
cylinder(d=pMshelfBoltD, h=pMH, $fn=36); | |||
mirror([1,0,0]){ | |||
//1 | |||
translate([0,(cos(pMd1e-pMd0)*((pMID/2)+(pMshelfBoltD)+pMgroove)),0]) | |||
translate([-((((c2ID+(pMgroove*2)+(pMwallT*2))/2)*cos(90-(pMd1e-pMd0)))+(pMshelfX/2)),0,0]) | |||
cylinder(d=pMshelfBoltD, h=pMH, $fn=36); | |||
//2 | |||
translate([0,(cos(pMd1e-pMd0)*((pMID/2)+(pMshelfBoltD)+pMgroove)),0]) | |||
translate([-((((c2ID+(pMgroove*2)+(pMwallT*2))/2)*cos(90-(pMd1e-pMd0)))+(pMshelfX/2)),0,0]) | |||
translate([0,(((((c2ID+(pMgroove*2)+(pMwallT*2))/2)/cos(pMd1e-pMd0))-((pMID/2)+(pMshelfBoltD)+pMgroove))/1.5),0]) | |||
cylinder(d=pMshelfBoltD, h=pMH, $fn=36); | |||
} //end mirror | |||
} //end rotate | |||
//end of bolt holes | |||
////////////// | |||
}//end main difference | |||
}//end main translate | |||
}//end module | |||
// Parametric Involute Bevel and Spur Gears by GregFrost | |||
// It is licensed under the Creative Commons - GNU LGPL 2.1 license. | |||
// © 2010 by GregFrost, thingiverse.com/Amp | |||
// http://www.thingiverse.com/thing:3575 and http://www.thingiverse.com/thing:3752 | |||
//================================================== | |||
// Bevel Gears: | |||
// Two gears with the same cone distance, circular pitch (measured at the cone distance) | |||
// and pressure angle will mesh. | |||
module gear ( | |||
number_of_teeth=Tn, | |||
circular_pitch=false, diametral_pitch=false, | |||
pressure_angle=28, | |||
clearance = 0.2, | |||
gear_thickness=5, | |||
rim_thickness=8, | |||
rim_width=5, | |||
hub_thickness=10, | |||
hub_diameter=15, | |||
bore_diameter=5, | |||
circles=0, | |||
backlash=0, | |||
twist=0, | |||
involute_facets=0, | |||
flat=false) | |||
{ | |||
if (circular_pitch==false && diametral_pitch==false) | |||
echo("MCAD ERROR: gear module needs either a diametral_pitch or circular_pitch"); | |||
//Convert diametrial pitch to our native circular pitch | |||
circular_pitch = (circular_pitch!=false?circular_pitch:180/diametral_pitch); | |||
// Pitch diameter: Diameter of pitch circle. | |||
pitch_diameter = number_of_teeth * circular_pitch / 180; | |||
pitch_radius = pitch_diameter/2; | |||
echo ("Teeth:", number_of_teeth, " Pitch radius:", pitch_radius); | |||
CKc2_pitch_radius=pitch_radius; | |||
// Base Circle | |||
base_radius = pitch_radius*cos(pressure_angle); | |||
// Diametrial pitch: Number of teeth per unit length. | |||
pitch_diametrial = number_of_teeth / pitch_diameter; | |||
// Addendum: Radial distance from pitch circle to outside circle. | |||
addendum = 1/pitch_diametrial; | |||
//Outer Circle | |||
outer_radius = pitch_radius+addendum; | |||
//Use if statement and mix/max to select tooth count and circular pitch that creates a radius that is smaller than the OD of the CKp3 | |||
//circular pitch defined bt ckp3OD. number of teeth calculated for target addendum. | |||
echo("radius",outer_radius); | |||
// Dedendum: Radial distance from pitch circle to root diameter | |||
dedendum = addendum + clearance; | |||
// Root diameter: Diameter of bottom of tooth spaces. | |||
root_radius = pitch_radius-dedendum; | |||
backlash_angle = backlash / pitch_radius * 180 / pi; | |||
half_thick_angle = (360 / number_of_teeth - backlash_angle) / 4; | |||
// Variables controlling the rim. | |||
rim_radius = root_radius - rim_width; | |||
// Variables controlling the circular holes in the gear. | |||
circle_orbit_diameter=hub_diameter/2+rim_radius; | |||
circle_orbit_curcumference=pi*circle_orbit_diameter; | |||
// Limit the circle size to 90% of the gear face. | |||
circle_diameter= | |||
min ( | |||
0.70*circle_orbit_curcumference/circles, | |||
(rim_radius-hub_diameter/2)*0.9); | |||
difference() | |||
{ | |||
union () | |||
{ | |||
difference () | |||
{ | |||
linear_exturde_flat_option(flat=flat, height=rim_thickness, convexity=10, twist=twist) | |||
gear_shape ( | |||
number_of_teeth, | |||
pitch_radius = pitch_radius, | |||
root_radius = root_radius, | |||
base_radius = base_radius, | |||
outer_radius = outer_radius, | |||
half_thick_angle = half_thick_angle, | |||
involute_facets=involute_facets); | |||
if (gear_thickness < rim_thickness) | |||
translate ([0,0,gear_thickness]) | |||
cylinder (r=rim_radius,h=rim_thickness-gear_thickness+1); | |||
} | |||
if (gear_thickness > rim_thickness) | |||
linear_exturde_flat_option(flat=flat, height=gear_thickness) | |||
circle (r=rim_radius); | |||
if (flat == false && hub_thickness > gear_thickness) | |||
translate ([0,0,gear_thickness]) | |||
linear_exturde_flat_option(flat=flat, height=hub_thickness-gear_thickness) | |||
circle (r=hub_diameter/2); | |||
} | |||
translate ([0,0,-1]) | |||
linear_exturde_flat_option(flat =flat, height=2+max(rim_thickness,hub_thickness,gear_thickness)) | |||
circle (r=bore_diameter/2); | |||
if (circles>0) | |||
{ | |||
for(i=[0:circles-1]) | |||
rotate([0,0,i*360/circles]) | |||
translate([circle_orbit_diameter/2,0,-1]) | |||
linear_exturde_flat_option(flat =flat, height=max(gear_thickness,rim_thickness)+3) | |||
circle(r=circle_diameter/2); | |||
} | |||
} | |||
} | |||
module linear_exturde_flat_option(flat =false, height = 10, center = false, convexity = 2, twist = 0) | |||
{ | |||
if(flat==false) | |||
{ | |||
linear_extrude(height = height, center = center, convexity = convexity, twist= twist) child(0); | |||
} | |||
else | |||
{ | |||
child(0); | |||
} | |||
} | |||
module gear_shape ( | |||
number_of_teeth, | |||
pitch_radius, | |||
root_radius, | |||
base_radius, | |||
outer_radius, | |||
half_thick_angle, | |||
involute_facets) | |||
{ | |||
union() | |||
{ | |||
rotate (half_thick_angle) circle ($fn=number_of_teeth*2, r=root_radius); | |||
for (i = [1:number_of_teeth]) | |||
{ | |||
rotate ([0,0,i*360/number_of_teeth]) | |||
{ | |||
involute_gear_tooth ( | |||
pitch_radius = pitch_radius, | |||
root_radius = root_radius, | |||
base_radius = base_radius, | |||
outer_radius = outer_radius, | |||
half_thick_angle = half_thick_angle, | |||
involute_facets=involute_facets); | |||
} | |||
} | |||
} | |||
} | |||
module involute_gear_tooth ( | |||
pitch_radius, | |||
root_radius, | |||
base_radius, | |||
outer_radius, | |||
half_thick_angle, | |||
involute_facets) | |||
{ | |||
min_radius = max (base_radius,root_radius); | |||
pitch_point = involute (base_radius, involute_intersect_angle (base_radius, pitch_radius)); | |||
pitch_angle = atan2 (pitch_point[1], pitch_point[0]); | |||
centre_angle = pitch_angle + half_thick_angle; | |||
start_angle = involute_intersect_angle (base_radius, min_radius); | |||
stop_angle = involute_intersect_angle (base_radius, outer_radius); | |||
res=(involute_facets!=0)?involute_facets:($fn==0)?5:$fn/4; | |||
union () | |||
{ | |||
for (i=[1:res]) | |||
assign ( | |||
point1=involute (base_radius,start_angle+(stop_angle - start_angle)*(i-1)/res), | |||
point2=involute (base_radius,start_angle+(stop_angle - start_angle)*i/res)) | |||
{ | |||
assign ( | |||
side1_point1=rotate_point (centre_angle, point1), | |||
side1_point2=rotate_point (centre_angle, point2), | |||
side2_point1=mirror_point (rotate_point (centre_angle, point1)), | |||
side2_point2=mirror_point (rotate_point (centre_angle, point2))) | |||
{ | |||
polygon ( | |||
points=[[0,0],side1_point1,side1_point2,side2_point2,side2_point1], | |||
paths=[[0,1,2,3,4,0]]); | |||
} | |||
} | |||
} | |||
} | |||
// Mathematical Functions | |||
//=============== | |||
// Finds the angle of the involute about the base radius at the given distance (radius) from it's center. | |||
//source: http://www.mathhelpforum.com/math-help/geometry/136011-circle-involute-solving-y-any-given-x.html | |||
function involute_intersect_angle (base_radius, radius) = sqrt (pow (radius/base_radius, 2) - 1) * 180 / pi; | |||
// Calculate the involute position for a given base radius and involute angle. | |||
function rotated_involute (rotate, base_radius, involute_angle) = | |||
[ | |||
cos (rotate) * involute (base_radius, involute_angle)[0] + sin (rotate) * involute (base_radius, involute_angle)[1], | |||
cos (rotate) * involute (base_radius, involute_angle)[1] - sin (rotate) * involute (base_radius, involute_angle)[0] | |||
]; | |||
function mirror_point (coord) = | |||
[ | |||
coord[0], | |||
-coord[1] | |||
]; | |||
function rotate_point (rotate, coord) = | |||
[ | |||
cos (rotate) * coord[0] + sin (rotate) * coord[1], | |||
cos (rotate) * coord[1] - sin (rotate) * coord[0] | |||
]; | |||
function involute (base_radius, involute_angle) = | |||
[ | |||
base_radius*(cos (involute_angle) + involute_angle*pi/180*sin (involute_angle)), | |||
base_radius*(sin (involute_angle) - involute_angle*pi/180*cos (involute_angle)) | |||
]; | |||
</nowiki> | |||
===CKc3.scad=== | |||
[[Image:CKc3.png|400px]] | |||
*todo - remove spacer mounting holes under mountain | |||
*add optional makerbream holes | |||
<nowiki> | |||
include <CKvars.scad>; | |||
use <CKp8--plateconnector.scad> | |||
use <CKpM--mountain.scad> | |||
use <mb10.scad>; | |||
////// | |||
//TODO | |||
// | |||
//*spacer mount holes should be further out from ID | |||
//*mounting holes for mountain tabs | |||
//*test place mountain for fit | |||
//*openbeam holes | |||
// | |||
////// | |||
TF=2; //2 for optional maker beam holes | |||
projection(cut = false) | |||
CKc3(); | |||
/* | |||
translate([0,-c3OD/2,0]) | |||
translate([0,p3wallOD/2,-pPspace2]) | |||
rotate([0,0,0]) | |||
CKpM(0); | |||
*/ | |||
//translate([0,0,c3H]) | |||
//rotate([0,0,-90]) | |||
//CKp8(); | |||
echo((c3OD-c3ID)/2); | |||
module CKc3(){ | |||
rez=p2number*p2needles*2; //calculate desired rezolution | |||
$fn=rez; //defines resolution of circles. | |||
translate([0,-c3OD/2,0]){ //[c3OD/2,0,0] | |||
difference(){ | |||
union(){ | |||
cylinder(h=c3H,d=c3OD); | |||
} //end main union | |||
cylinder(h=c3H+2,d=c3ID); // donut hole | |||
//plate connector holes | |||
for(i=[1:c2connectors-1]){ | |||
rotate([0,0,((360/c2connectors)*i)]){ | |||
translate([0,p8innerboltO2C,-0.1]) | |||
cylinder(d=p8holeD,h=c3H+0.2,$fn=36); | |||
translate([0,p8outerboltO2C,-0.1]) | |||
cylinder(d=p8holeD,h=c3H+0.2,$fn=36); | |||
} //end rotate i | |||
} //end for | |||
//mountain cutout | |||
rotate([0,0,0]){ | |||
translate([-(((c2ID+(pMgroove*2)+(pMwallT*2))/2)*cos(90-(pMd1e-pMd0))),0,0]) | |||
cube([((((c2ID+(pMgroove*2)+(pMwallT*2))/2)*cos(90-(pMd1e-pMd0)))*2),((c2ID+(pMgroove*2)+(pMwallT*2))/2),c3H]); | |||
translate([-(((c2ID+(pMgroove*2)+(pMwallT*2))/2)*cos(90-(pMd1e-pMd0))),((c2ID+(pMgroove*2)+(pMwallT*2))/2),0]) | |||
translate([pMshelfBoltD/2,0,0]) | |||
cylinder(d=pMshelfBoltD, h=pMH, $fn=36); | |||
mirror([1,0,0]) | |||
translate([-(((c2ID+(pMgroove*2)+(pMwallT*2))/2)*cos(90-(pMd1e-pMd0))),((c2ID+(pMgroove*2)+(pMwallT*2))/2),0]) | |||
translate([pMshelfBoltD/2,0,0]) | |||
cylinder(d=pMshelfBoltD, h=pMH, $fn=36); | |||
} | |||
////// | |||
//mounting bolt holes | |||
rotate([0,0,0]){ | |||
//1 | |||
translate([0,(cos(pMd1e-pMd0)*((pMID/2)+(pMshelfBoltD)+pMgroove)),0]) | |||
translate([-((((c2ID+(pMgroove*2)+(pMwallT*2))/2)*cos(90-(pMd1e-pMd0)))+(pMshelfX/2)),0,0]) | |||
cylinder(d=pMshelfBoltD, h=pMH, $fn=36); | |||
//2 | |||
translate([0,(cos(pMd1e-pMd0)*((pMID/2)+(pMshelfBoltD)+pMgroove)),0]) | |||
translate([-((((c2ID+(pMgroove*2)+(pMwallT*2))/2)*cos(90-(pMd1e-pMd0)))+(pMshelfX/2)),0,0]) | |||
translate([0,(((((c2ID+(pMgroove*2)+(pMwallT*2))/2)/cos(pMd1e-pMd0))-((pMID/2)+(pMshelfBoltD)+pMgroove))/1.5),0]) | |||
cylinder(d=pMshelfBoltD, h=pMH, $fn=36); | |||
mirror([1,0,0]){ | |||
//1 | |||
translate([0,(cos(pMd1e-pMd0)*((pMID/2)+(pMshelfBoltD)+pMgroove)),0]) | |||
translate([-((((c2ID+(pMgroove*2)+(pMwallT*2))/2)*cos(90-(pMd1e-pMd0)))+(pMshelfX/2)),0,0]) | |||
cylinder(d=pMshelfBoltD, h=pMH, $fn=36); | |||
//2 | |||
translate([0,(cos(pMd1e-pMd0)*((pMID/2)+(pMshelfBoltD)+pMgroove)),0]) | |||
translate([-((((c2ID+(pMgroove*2)+(pMwallT*2))/2)*cos(90-(pMd1e-pMd0)))+(pMshelfX/2)),0,0]) | |||
translate([0,(((((c2ID+(pMgroove*2)+(pMwallT*2))/2)/cos(pMd1e-pMd0))-((pMID/2)+(pMshelfBoltD)+pMgroove))/1.5),0]) | |||
cylinder(d=pMshelfBoltD, h=pMH, $fn=36); | |||
} //end mirror | |||
} //end rotate | |||
//end of bolt holes | |||
////////////// | |||
//makerbeam holes | |||
if(TF==2){ | |||
translate([(TFW/2)-(10/2),((c2ID+(pMgroove*2)+(pMwallT*2))/2)+(10/2),0]) | |||
cylinder(d=3, h=pMH, $fn=36); | |||
mirror([1,0,0]) | |||
translate([(TFW/2)-(10/2),((c2ID+(pMgroove*2)+(pMwallT*2))/2)+(10/2),0]) | |||
cylinder(d=3, h=pMH, $fn=36); | |||
} | |||
} //end | } //end main difference | ||
} //end main difference | |||
} //end main translate | |||
} //end CKc3 module | |||
</nowiki> | |||
==Parts== | |||
===MakerBeam=== | |||
*https://www.makerbeam.com/makerbeam-1500mm-1p-clear-makerbeam.html | |||
<nowiki> | |||
mbL=10; | |||
MB10(mbL); | |||
module MB10(bmL){ | |||
for(i=[1:4]){ | |||
rotate([0,0,90*i]){ | |||
mbCorner(); | |||
mirror(1,0,0) | |||
mbCorner(); | |||
} | |||
} | |||
} | |||
module mbCorner(){ | |||
bmX=10; | |||
bmCX=4; | |||
cornerD=0.2; | |||
innerD=0.4; | |||
armD1=1; | |||
armD2=1.3; | |||
boltD=3; | |||
hull(){ | |||
translate([(bmX/2)-(cornerD/2),(bmX/2)-(cornerD/2),0]) | |||
cylinder(d=cornerD, h=mbL, $fn=36); | |||
translate([(bmX/2)+(cornerD/2)-3.5,(bmX/2)-(cornerD/2),0]) | |||
cylinder(d=cornerD, h=mbL, $fn=36); | |||
translate([(bmX/2)+(cornerD/2)-3.5,(bmX/2)+(cornerD/2)-1,0]) | |||
cylinder(d=cornerD, h=mbL, $fn=36); | |||
translate([(bmX/2)-(cornerD/2),(bmX/2)+(cornerD/2)-1,0]) | |||
cylinder(d=cornerD, h=mbL, $fn=36); | |||
} | |||
hull(){ | |||
translate([(bmX/2)-(armD1/2),(bmX/2)-(armD1/2),0]) | |||
cylinder(d=armD1, h=mbL, $fn=36); | |||
translate([(cos(45)*((boltD+armD2)/2)),(cos(45)*((boltD+armD2)/2)),0]) | |||
cylinder(d=armD2, h=mbL, $fn=36); | |||
} | |||
translate([(bmX/2)-2.276,(bmX/2)-1-(innerD/2),0]) | |||
difference(){ | |||
union(){ | |||
rotate([0,0,45]) | |||
translate([innerD,0,mbL/2]) | |||
#cube([innerD*2,innerD*2,mbL],center=true); | |||
} | |||
cylinder(d=innerD,h=mbL,$fn=36); | |||
translate([-innerD/2,0,mbL/2]) | |||
#cube([innerD,innerD,mbL],center=true); | |||
} | |||
difference(){ | |||
translate([-(bmCX/2),-(bmCX/2),0]) | |||
cube([bmCX,bmCX,mbL]); | |||
cylinder(d=boltD,h=mbL,$fn=36); | |||
} | |||
} //end corner module | |||
</nowiki> | |||
===Aluminum Angle Corner=== | |||
*https://www.diy.com/departments/aluminium-corner-h-10mm-w-10mm-l-2m/254056_BQ.prd | |||
**10mm x 10mm | |||
*https://www.homedepot.com/p/Everbilt-1-2-in-x-96-in-Aluminum-Angle-Bar-with-1-20-in-T-802677/204273980 | |||
**1/2" ~ 12.7mm | |||
==Full Assembly== | |||
[[Image:CKv1803.png|600px]] | |||
<nowiki> | |||
include <CKvars.scad>; | |||
use <CKneedle.scad>; | |||
use <CKp1--motor_gear.scad>; | |||
use <CKp2--inner.scad>; | |||
use <CKp3--outer.scad>; | |||
use <CKp4--yardHolder.scad>; | |||
use <CKp5--smallbearingholder.scad>; | |||
//use <CKp6--bigbearingholder.scad>; | |||
use <CKp7--Zbearingholder.scad>; | |||
use <CKp8--plateconnector.scad>; | |||
use <CKp9--outerconnector.scad>; | |||
use <CKpM--mountain.scad>; | |||
use <CKc1--tabletop.scad>; | |||
use <CKc2--bottom_surface_motor_gears.scad>; | |||
use <CKc3--topplate.scad>; | |||
//needle | |||
rotate([0,0,0]){ //-(360/p2number*p2needles)/2 | |||
translate([0,0,-nB+(pPspace1+pPplate1)]) | |||
rotate([0,0,-((360/p2number/p2needles)*3.5)+((360/p4number))]) //(360/(p2number*p2needles))*1 | |||
translate([(-p3wallID/2)+(p2needlegrooveDepthslop/2),0,0]) | |||
translate([0,nX/2,0]) | |||
rotate([90,0,0]) | |||
needle(); | |||
translate([0,0,-nB+(pPspace1+pPplate1+pMgrooveC1-nC)]) | |||
rotate([0,0,((360/(p2number*p2needles))*1)-((360/p2number/p2needles)*3.5)+((360/p4number))]) | |||
translate([(-p3wallID/2)+(p2needlegrooveDepthslop/2),0,0]) | |||
translate([0,nX/2,0]) | |||
rotate([90,0,0]) | |||
needle(); | |||
translate([0,0,-nB+(pPspace1+pPplate1+pMgrooveC2-nC)]) | |||
rotate([0,0,((360/(p2number*p2needles))*2)-((360/p2number/p2needles)*3.5)+((360/p4number))]) | |||
translate([(-p3wallID/2)+(p2needlegrooveDepthslop/2),0,0]) | |||
translate([0,nX/2,0]) | |||
rotate([90,0,0]) | |||
needle(); | |||
translate([0,0,-nB+(pPspace1+pPplate1+pMgrooveC3-nC-(pMgrooveD-nC))]) | |||
rotate([0,0,((360/(p2number*p2needles))*3)-((360/p2number/p2needles)*3.5)+((360/p4number))]) | |||
translate([(-p3wallID/2)+(p2needlegrooveDepthslop/2),0,0]) | |||
translate([0,nX/2,0]) | |||
rotate([90,0,0]) | |||
needle(); | |||
} | |||
//c1 | |||
translate([-c1OD/2,0,-c1H]) | |||
CKc1(); | |||
//p1 - motor gear | |||
rotate([0,0,0]) | |||
translate([-(CKp1_pitch_radius+CKc2_pitch_radius),0,1]) | |||
CKp1(); | |||
//p2 - inner wall needle guide | |||
for(i=[1:p2number]){ | |||
rotate([0,0,i*(360/p2number)]) | |||
translate([-p2OD/2,0,p3base45H]) | |||
CKp2(); | |||
} | |||
//p3 - outer wall | |||
for(i=[1:p3number]){ | |||
rotate([0,0,i*(360/p3number)]) | |||
translate([-p3baseOD/2,0,0]) | |||
CKp3(); | |||
} | |||
//p9 - connector for p3 | |||
for(i=[1:p3number]){ | |||
rotate([0,0,i*(360/p3number)]) | |||
translate([-p3wallOD/2,0,(p2holeH)-(p9H/2)]) | |||
rotate([0,0,180]) | |||
CKp9(); | |||
}//end for | |||
//p4 - yard holder at top | |||
for(i=[1:p4number]){ | |||
rotate([0,0,-((360/p2number/p2needles)*3.5)+(i*(360/p4number))]) | |||
translate([-(p4baseOD/2),0,p3base45H+p2H-p4basegapH]) | |||
CKp4(); | |||
} | |||
//p7 Z | |||
for(i=[1:c2bmounts]){ | |||
rotate([0,0,((45)+((360/c2bmounts)*i))]){ | |||
translate([0,(c3OD/2)-p7bearingfromfront-(p7wiggleL/2)-bearingholderZBW,0]){ //close enough? | |||
//trans Y old : (c3OD/2)-((p7mountL-p7wallW)/2)-((bearingholderZBW+p7wiggleL)/2)-(p7wiggleL/2) | |||
CKp7(1); | |||
}//end translate | |||
}//end rotate | |||
}//end for | |||
////////////////// | |||
//ROTATING SECTION | |||
rotate([0,0,360/c2connectors/2]){ | |||
//c2 | |||
translate([0,c3OD/2,pPspace1]) | |||
CKc2(); | |||
//c3 | |||
translate([0,c3OD/2,pPspace1+pPplate1+pPspace2]) | |||
CKc3(); | |||
//p5 - small bearing holder | |||
for(i=[1:c2bmounts]){ | |||
rotate([0,0,((360/c2connectors)*1.5)+((360/c2bmounts)*i)]){ | |||
translate([0,(p3baseOD/2)+1,pPspace1]){ | |||
mirror([0,0,1]) | |||
CKp5(1); //small bearing holder | |||
}//end translate | |||
}//end rotate | |||
}//end for | |||
//small bearing holder - under mountain | |||
rotate([0,0,0]){ | |||
translate([0,(p3baseOD/2)+1,pPspace1]){ | |||
mirror([0,0,1]) | |||
CKp5(1); //small bearing holder | |||
}//end translate | |||
}//end rotate | |||
//p8 | |||
translate([0,0,pPspace1+pPplate1]) | |||
for(i=[1:c2connectors]){ | |||
rotate([0,0,((360/c2connectors)*i)]){ | |||
translate([0,(pMID/2)+(pMgroove)+1+(p8baseL/2),0]){ | |||
translate([0,-p8baseL/2,-0.1]) | |||
CKp8(); | |||
}//end translate | |||
}//end rotate | |||
}//end for | |||
//mountain | |||
translate([0,0,0]) | |||
translate([0,p3wallOD/2,(pPspace1+pPplate1+pPspace2+pPplate2)-(pPspace2+pPplate2)]) | |||
rotate([0,0,0]) | |||
CKpM(0); | |||
} //end rotate | |||
//END ROTATING SECTION | |||
////////////////////// | |||
</nowiki> | |||
==BOM== | |||
*Use echo to list parts used | |||
<nowiki> | |||
include <CKvars.scad>; | |||
use <CKneedle.scad>; | |||
use <CKp1--motor_gear.scad>; | |||
use <CKp2--inner.scad>; | |||
use <CKp3--outer.scad>; | |||
use <CKp4--yardHolder.scad>; | |||
use <CKp5--smallbearingholder.scad>; | |||
//use <CKp6--bigbearingholder.scad>; | |||
use <CKp7--Zbearingholder.scad>; | |||
use <CKp8--plateconnector.scad>; | |||
use <CKp9--outerconnector.scad>; | |||
use <CKpM--mountain.scad>; | |||
use <CKc1--tabletop.scad>; | |||
use <CKc2--bottom_surface_motor_gears.scad>; | |||
use <CKc3--topplate.scad>; | |||
echo("===Bill of Materials==="); | |||
//needle | |||
echo("Needles:", p2number*p2needles); | |||
//c1 | |||
//Wood Mount Screws | |||
echo("c1 Wood Screws","Size:",woodbeamScrewOD,"x",c1H+6,"mm","Count:",(16)); | |||
echo("c1 Stepper Socket Cap Screws","Size: M",NEMAboltOD,"x",c1H+4,"mm","Count:",(c1steppersnumber*4)); | |||
//p1 - motor gear | |||
echo("p1 Bolts","Size: M",NEMAsetboltOD,"x",NEMAsetboltL,"mm","Count:",(c1steppersnumber)); | |||
//M3 Base Nuts | |||
echo("p1 Square Nuts","Size: M",NEMAsetboltOD,"Count:",(c1steppersnumber)); | |||
//p2 - inner wall needle guide | |||
//see p3 | |||
//p3 - outer wall | |||
//M3 Base Bolts - 12 | |||
echo("p3 Bolts","Size: M",p3baseholeD,"x",ceil((p3baseH+table_surface+p3baseholeD+1)/2)*2,"mm","Count:",(p3number*p3baseholenumber)); | |||
//M3 Base Nuts | |||
echo("p3 Nuts","Size: M",p3baseholeD,"Count:",(p3number*p3baseholenumber)); | |||
echo("p3/p9 Socket Cap Screws","Size: M",p2holeD,"x",p3upperwallW+p2W-p2holeCSL+p9thickness+p2holeD,"mm","Count:",p3number*4); | |||
echo("p3/p2 Socket Cap Screws","Size: M",p2holeD,"x",p3upperwallW+p2W-p2holeCSL+p2holeD,"mm","Count:",(p2number*2)-(p3number*2)); | |||
//p9 - connector for p3 | |||
//see p3 | |||
//p4 - yard holder at top | |||
//M2 Socket Cap Srews | |||
echo("p4 Socket Cap Screws","Size: M",p2holeD,"x",((p4baseOD-p4baseID)/2)-p2holeCSL,"mm","Count:",p2number*2); | |||
//p7 Z | |||
//M3 Base Bolts - 12 | |||
echo("p7 Bolts","Size: M",p7mountholeOD,"x",ceil((p7baseH+table_surface+p7mountholeOD-0.25)/2)*2,"mm","Count:",(p7number*3)); | |||
//M3 Base Nuts | |||
echo("p7 Nuts","Size: M",p7mountholeOD,"Count:",(p7number*3)); | |||
////////////////lock nut size? | |||
//M5 Bearing Mount Bolt | |||
echo("p7 Bearing Bolts","Size: M",p7boltD,"x",p7boltL,"mm","Count:",p7number); | |||
//M5 Bearing Mount Nut | |||
echo("p7 Bearing Nuts","Size: M",p7boltD,"Count:",p7number); | |||
//Bearing (bore 5mm x 10mm x 4mm) | |||
echo("p7 Bearings","Bore:",bearingholderZBID,"x","OD:",bearingholderZBOD,"x","Width:",bearingholderZBW,"Count:",(p7number)); | |||
////////////////// | |||
//ROTATING SECTION | |||
//rotate([0,0,360/c2connectors/2]){ | |||
//c2 | |||
//translate([0,c3OD/2,pPspace1]) | |||
//CKc2(); | |||
//c3 | |||
//translate([0,c3OD/2,pPspace1+pPplate1+pPspace2]) | |||
//CKc3(); | |||
//p5 - small bearing holder | |||
//for(i=[1:c2bmounts]){ | |||
// rotate([0,0,((360/c2connectors)*1.5)+((360/c2bmounts)*i)]){ | |||
// translate([0,(p3baseOD/2)+1,pPspace1]){ | |||
// mirror([0,0,1]) | |||
//CKp5(1); //small bearing holder | |||
// }//end translate | |||
// }//end rotate | |||
//}//end for | |||
//small bearing holder - under mountain | |||
// rotate([0,0,0]){ | |||
// translate([0,(p3baseOD/2)+1,pPspace1]){ | |||
// mirror([0,0,1]) | |||
//CKp5(1); //small bearing holder | |||
// }//end translate | |||
// }//end rotate | |||
//p8 | |||
//translate([0,0,pPspace1+pPplate1]) | |||
// for(i=[1:c2connectors-1]){ | |||
// rotate([0,0,((360/c2connectors)*i)]){ | |||
// translate([0,(pMID/2)+(pMgroove)+1+(p8baseL/2),0]){ | |||
// translate([0,-p8baseL/2,-0.1]) | |||
// CKp8(); | |||
// }//end translate | |||
// }//end rotate | |||
// }//end for | |||
//mountain | |||
//translate([0,0,0]) | |||
//translate([0,p3wallOD/2,(pPspace1+pPplate1+pPspace2+pPplate2)-(pPspace2+pPplate2)]) | |||
//rotate([0,0,0]) | |||
//CKpM(0,1,1); | |||
//((360/(p2number*p2needles))*3)-((360/p2number/p2needles)*3.5)+((360/p4number)) | |||
//translate([0,0,-nB+(pPspace1+pPplate1+pMgrooveC3-nC-(pMgrooveD-nC))]) | |||
//rotate([0,0,-90]) | |||
//translate([(-p3wallID/2)+(p2needlegrooveDepthslop/2),0,0]) | |||
//translate([0,nX/2,0]) | |||
//rotate([90,0,0]) | |||
//needle(); | |||
// } //end rotate | |||
//END ROTATING SECTION | |||
////////////////////// | |||
</nowiki> | </nowiki> | ||
== | =To Do= | ||
*make motor's gear optionally 3d printed or laser cut utilizing Pololu hub | |||
*make an optional plywood cnc cut board that pairs with c1 table top | |||
*calculate angle from OD of needle's hook at lowest poistion to the top of p4 base | |||
**what is ideal? +45? force pulling loop away from latch minimized at lower angles? | |||
*thread feeder hole, measure knot diameter | |||
**maybe 4-5mm? need to accomidate end/begining thread connecting knots | |||
*yarn stick holder etc | |||
*tensioner etc | |||
*printable bowl to hold bag of water on fabric tension plate? | |||
===Test=== | |||
*determine smallest diameter machine | |||
**what needs to change to go smaller? | |||
***create a minimum c1 table top dimension? | |||
***do some of the parts render incorrectly if over 180degrees around circle? | |||
*test larger machine size | |||
**what are the standard diameters of fabric | |||
<nowiki> | <nowiki> | ||
//number of "p2" parts around circle //Jan2019 //small | |||
p2number=8; //12 //36 ///36 //12 //8 | |||
//number of needles mounted on each "p2" part | |||
p2needles=7; //5 //10 ///5 //5 //7 | |||
//number of "p3" parts around circle | |||
p3number=2; //4 //18 ///4 //4 //2 | |||
//number of "p4" parts around circle | |||
p4number=2; //4 //18 ///4 //4 //2 | |||
//distance from the inside face of one needle to the next | |||
needle2needle=9.25; //default=14.35615 //try 8.414 //13.5334 //9.25 | |||
pMgrooveturnR=10; //radius of upper curved path in groove //14 //10 | |||
pMgrooveturnR2=7; //radius of lower curved path in groove //7 | |||
pMgrooveturnR3=7; // radius of entrance curved path | |||
pMp7X=2; //half of length of plateu of groove. preferably whole number //3 //2 | |||
pMp3X=2; //length of lower plateu of groove //2.5 //2 | |||
</nowiki> | </nowiki> | ||
*lower length of groove7 and groove3? | |||
*might change back to M2 or M2.5 sized bolts | |||
=Known Bugs= | |||
*Only 45 degree angle works for mountain groove path | |||
**curved paths break, something in the sin/cos is not correct | |||
*needle2needle value doesnt seem to be rendering exactly as was measured on original stl | |||
=Future Work= | |||
*create design so that mountains are stationary and needles rotate | |||
**add multiple mountains, yarn can remain stationary | |||
**output fabric spool must rotate too | |||
**[[RotoKnitic v19.01]] | |||
*sock heels | |||
**mechanism to raise needles to a position above mountain so they can skip loops | |||
=Internal Links= | |||
*[[Open Source Textile Construction Set]] | |||
*[[Open Source Circular Knitting Machine]] | |||
*[[CircularKnitic Parametric]] | |||
= | =External Links= | ||
* | *https://en.wikipedia.org/wiki/Trigonometric_functions | ||
* | *https://en.wikipedia.org/wiki/List_of_gear_nomenclature | ||
* | *https://en.wikipedia.org/wiki/Gear#Nomenclature | ||
*https://en.wikipedia.org/wiki/Bolt_(fabric) | |||
*https://www.wyzant.com/resources/lessons/math/algebra/properties_of_algebra | |||
*https://en.wikipedia.org/wiki/Arc_(geometry)#Arc_radius | |||
:Casting On | |||
:*https://www.youtube.com/watch?v=uYooxahwKp0 | |||
:Casting Off | |||
:*https://www.youtube.com/watch?v=yn97N6usdvI | |||
[[Category: Textiles]] | |||
Latest revision as of 03:02, 29 November 2020
Basics
- OSE's Fork of CircularKnitic, the open source circulate knitting machine
- Code available on GitHub https://github.com/OpenSourceEcology/circular_knitic
- Test build - original size - User:Dorkmo/Builds/CircularKnitic
- Test build - sock size - User:Dorkmo/Builds/CircularKnitic-Sock
Goals
Needle Accomidation
- Long tails
- Bent back tails (postponed)
- Test 3D printed needles (postponed)
Fabric Spool
- Apply constant tension on fabric (postponed)
- Roll onto spool for easy handling and storage (postponed)
Part Code
Variable Profiles
- Basic Settings for quickly choosing a specific sized machine
CKvarProfile-SockTest201904.scad
/////////////////// USER SETTINGS /////////////////// ///////////// // USING THIS FILE: // choose desired settings below // rename and save this file into the "SCAD" folder // for example CKvarsProfile-Small2019.scad // then open the file named CKvars.scad in the "SCAD" folder // find the "include" commands at the begining of the file // change this information to this new file's name, then save // you can now open then render each part file with these settings ///////////// //File Notes - Small201903 // attempting to get near sock dimensions // looks like need about 1.5 to 1.0 thread diameter // approx example 20loops/54mm 170mm circumference ///////////// // DIMENSIONS //number of "p2" needle guides around circle //Jan2019 //small UPp2number=6; //12 //36 ///36 //12 //8 //number of needles mounted on each "p2" part UPp2needles=6; //5 //10 ///5 //5 //7 //Note: UPp2number * UPp2needles = total needles //number of "p3" parts around circle UPp3number=2; //4 //18 ///4 //4 //2 //number of "p4" parts around circle UPp4number=2; //4 //18 ///4 //4 //2 //distance from the inside face of one needle to the next UPneedle2needle=9.12985; //default=14.35615 //try 8.414 //13.5334 //9.25 //mountain settings UPpMgrooveturnR=10; //radius of upper curved path in groove //14 //10 UPpMgrooveturnR2=7; //radius of lower curved path in groove //7 UPpMp3X=2; //length of lower plateu of groove //2.5 //2 UPpMp7X=2; //half of length of top plateu of groove //3 //2 ///////////// // MATERIALS //thread diameter - used to estimate circumference UPthreadD=1.5; //number of stepper motors driving the geared plate UPc1steppersnumber=2; //laser cut part thickness UPupper_surfaceH=3.4; //thickness of upper rotating plate ///5 //6.35= 1/4"inch UPbottom_surface_motor_gearsH=3.4; //thickness of geared rotating plate UPtable_surface=3.4; //thickness of plate of main table UPtable_support=12.7; //thickness of support board below table surface //width of wood used to support table around the edges UPwoodbeamW=25.4; //table leg wood beam width 1.0 inch UPwoodbeamScrewOD=6.32; // 1/4" screw hole into wood beam //thread feeder option UPTF=1; // 0=none 1=angle iron 2=makerbeam10mm //angle iron option dimensions UPaaX=12.7; //width //12.7 = 1/2in UPaaT=1.5875; //thickness //1.5875 = 1/16in ///////////////////////////////////////////////
CKvarsProfile-Medium201903.scad
/////////////////// USER SETTINGS /////////////////// ///////////// // USING THIS FILE: // choose desired settings below // rename and save this file into the "SCAD" folder // for example CKvarsProfile-Small2019.scad // then open the file named CKvars.scad in the "SCAD" folder // find the "include" commands at the begining of the file // change this information to the new file's name, then save // you can now open then render each part file with these settings ///////////// ///////////// // DIMENSIONS //number of "p2" needle guides around circle //Jan2019 //small UPp2number=12; //12 //36 ///36 //12 //8 //number of needles mounted on each "p2" part UPp2needles=5; //5 //10 ///5 //5 //7 //number of "p3" parts around circle UPp3number=4; //4 //18 ///4 //4 //2 //number of "p4" parts around circle UPp4number=4; //4 //18 ///4 //4 //2 //distance from the inside face of one needle to the next UPneedle2needle=13.5334; //default=14.35615 //try 8.414 //13.5334 //9.25 //mountain settings UPpMgrooveturnR=14; //radius of upper curved path in groove //14 //10 UPpMgrooveturnR2=7; //radius of lower curved path in groove //7 UPpMp3X=2.5; //length of lower plateu of groove //2.5 //2 UPpMp7X=3; //half of length of top plateu of groove //3 //2 ///////////// // MATERIALS //number of stepper motors driving the geared plate UPc1steppersnumber=2; //laser cut part thickness UPupper_surfaceH=3.4; //thickness of upper rotating plate ///5 //6.35= 1/4"inch UPbottom_surface_motor_gearsH=3.4; //thickness of geared rotating plate UPtable_surface=3.4; //thickness of plate of main table UPtable_support=12.7; //thickness of support board below table surface //width of wood used to support table around the edges UPwoodbeamW=25.4; //table leg wood beam width 1.0 inch UPwoodbeamScrewOD=6.32; // 1/4" screw hole into wood beam //thread feeder option UPTF=1; // 0=none 1=angle iron 2=makerbeam10mm //angle iron option dimensions UPaaX=12.7; //width //12.7 = 1/2in UPaaT=1.5875; //thickness //1.5875 = 1/16in ///////////////////////////////////////////////
CKvars.scad
- Variables to be defined for all aspects of the specific machine to be built
- These variables should be set the same for each part that is rendered
- calculate printer footprint for each part.
////////////////////////////////////// ///// Circular Knitic Variables ////// ////////////////////////////////////// ////////////////////////////////////// /////// CHOOSE MAIN SETTINGS /////// //select the needle size file that will be used include <CKvarsNeedle-KH260.scad>; //select the settings profile file include <CKvarsProfile-Small201903.scad>; ////////////////////////////////////// ////////////////////////////////////// /////// ADVANCED SETTINGS /////// //number of "p2" parts around circle //Jan2019 //small p2number=UPp2number; //12 //36 ///36 //12 //8 //number of needles mounted on each "p2" part p2needles=UPp2needles; //5 //10 ///5 //5 //7 //number of "p3" parts around circle p3number=UPp3number; //4 //18 ///4 //4 //2 //number of "p4" parts around circle p4number=UPp4number; //4 //18 ///4 //4 //2 //distance from the inside face of one needle to the next needle2needle=UPneedle2needle; //default=14.35615 //13.5334 //9.25 //calculated diameter from inside edge of needles p2needlegrooveID=((needle2needle*p2number*p2needles)/PI); //nnumber of Z bearing mounts c1zmounts=max(p3number,4); //p3number //4 c1steppersnumber=UPc1steppersnumber; //number of stepper motors driving the gear ////MATERIALS//// //thread feeder stand above mountain TF=UPTF; // 0=none 1=angle iron 2=makerbeamm TFW=60; //distance between outside edge of makerbream aaX=UPaaX; //12.7 = 1/2in aaT=UPaaT; //1.5875 = 1/16in aaboltD=3; aaboltHD=5.68; aaboltHH=3; aanutH=4; aasqNutW=5.5; aasqNutH=1.8; aasqNutSlop=0.25; pM2slop=0.25; pM2H=aaX*3; pM2mink=4; pM2fH=10; tipHole=3; //hole Size tipOpenX=10; tipOpenZ=10; tipcylD=1.75; //1.5 tipcy2D=tipcylD*1.5; //-(tipOpenX/2)+(tipcylD/2) //thickness of upper rotating plate ///5 //6.35= 1/4"inch upper_surfaceH=UPupper_surfaceH; //thickness of geared rotating plate bottom_surface_motor_gearsH=UPbottom_surface_motor_gearsH; //thickness of plate of main table table_surface=UPtable_surface; //thickness of support board below main table table_support=UPtable_support; woodbeamW=UPwoodbeamW; //table leg wood beam width 1.0 inch woodbeamScrewOD=UPwoodbeamScrewOD; // 1/4" screw hole ////PART SETTINGS//// //plate pPplate1=bottom_surface_motor_gearsH; //thickness of geared plated pPplate2=upper_surfaceH; /* //"connector0912" connects upper_surface plate to bottom_surface geared plate connector0912H=12; connector0912L=25; connector0912W=8; connector0912HoleOD=3; //hole diameter connector0912HoleC2C=17; //center of hole to center of other hole */ //p5 BearringSmall1312_x_4.stl bearingholderSmallB2C=5.5; //from base of bearing holder to center of bearing bearingholderSmallBOD=10; //Outside Diameter of bearing bearingholderSmallBID=4.9; //Inside Diameter of bore hole of bearing bearingholderSmallBW=4; //Width of bearing bearingholderSmallgaproll=0.25; //extra space to leave below bearing for rolling bearingholderSmallgapclear=0.5; //extra space to leave above bearing inside holder //BearringZ bearingholderZBOD=10; //Outside Diameter of bearing bearingholderZBID=4.9; //Inside Diameter of bore hole of bearing bearingholderZBW=4; //Width of bearing //4 //p1 - stepper gear NEMAshaftOD=5; NEMAshaftCut=0.5; NEMAshaftL=20; //length of shaft from motor face NEMAshaftFL=15; //length of flat side of shaft NEMAboltOD=3; NEMAboltHeadH=3; NEMAboltHeadOD=5.68; NEMAboltHexOD=2.87; NEMAfaceCricOD=22; NEMAboltDis=31; NEMAmotorW=42; NEMAsetboltL=8; //length of M3 botl used for set screw NEMAsetboltOD=3; NEMAsetHeadOD=5.68; NEMAsqNutW=5.5; NEMAsqNutH=1.8; NEMAsqNutSlop=0.25; spurgearTn=16; //number of teeth on bull gear //p2 - inner needle wall holder needleWidthslop=0.4; //exta thickness needleWidth=nX+needleWidthslop; p2needlegroovefromID=2.0; p2ID=p2needlegrooveID-(p2needlegroovefromID*2); p2needlegrooveDepthslop=0.4; //exta thickness p2needlegrooveDepth=nY+p2needlegrooveDepthslop; //p2H calculated below; p2W=p2needlegroovefromID+p2needlegrooveDepth; p2OD=p2ID+(p2W*2); //p2holeH calculated below p2holeD=2; //depricate p2holeCSD=4.01726; //depricate p2holeCSL=1.5; //depricate p2endtrim=0.5; //trim end of wall to give room between p2's p2p3boltType=2; //1 = reg cap screw, 2 = flat cap screw //type 1 p2p3boltD=3; p2p3boltHH=3; p2p3boltHD=5.68; //type 2 p2p3flatD=3; p2p3flatHA=90; p2p3flatHD=6.72; //listed as 6.72 max 5.54 min p2p3flatHH=1.86; p2p3nutH=4; p2p3nutOD=6.01; p2p4flatD=3; p2p4flatHA=90; p2p4flatHD=6.72; //listed as 6.72 max 5.54 min p2p4flatHH=1.86; p2p4nutH=4; echo("p2 lower bolt L",p2W+p3upperwallW+0); //fix echo("p2ID", p2ID); //p3 - outer needle wall slide p3wiggle=0.1; p3baseH=3; //height of outer base p3wallW=(nH-nY)/2; //half of needle butt p3upperwallW=3; p3baseholeD=3; p3baseholeScrewHeadD=5.68; p3baseholefromODID=p3baseholeScrewHeadD/2; p3baseholenumber=4; p3ridgeW1=3; p3ridgeW2=5; p3ridgeH=5; p3wallholefromtop=5; p3wallchamfW=2; p3wallchamfH=3; //p3wallH in calculations below //p3grooveH1 in calculations below //p3grooveH2 in calculations below p3grooveHslop=1; p3grooveWslop=0.8; //extra Width in needle groove p3grooveW=nX+p3grooveWslop; p3clear=5; //distance from top of p3 to needle flipper in down position p3baseID2N=2; //clearance between baseID and needles p3baseID=p2OD+(p3baseID2N*2); p3baseOD=p2OD+(p3wiggle*2)+(p3wallW*2)+(p3wallchamfW*2)+(p3baseholeScrewHeadD*2); centerlineD=p2ID+(p2W+(p3wiggle*2)); p3wallOD=centerlineD+(p3wallW*2)+((p2W+(p3wiggle*2)/2)); p3wallID=centerlineD+((p2W+(p3wiggle*2)/2)); p3base45W=p3ridgeW2+p3wiggle+p2W+p3wiggle+p3baseID2N; p3base45H=p3base45W; //height of 45 degree overhang p3needleholefactorW=1.5; //multiply width of needle tail hole in base by this p3endtrim=0.5; //p4 p4rampH=14.57; p4rampfromID=2.5; p4rampoverhangH=4; p4rsH=p4rampH-p4rampoverhangH; //height of ramp surface p4rampfromOD=1.34; p4rampC1=10; p4rampC2=40; p4rampC2transX=10; p4rampC2transZ=3.82; p4basegapH=max(p2p4flatD*3,8); p4baseH=p4basegapH+nD; //sin(45) of angle from front of needle?? p4baseW=11.2; p4basegapW=p2W+0.2; //5.09 p4clawW=min((needle2needle-(nX*2)),9); p4holesnumber=3; p4holeH=p4basegapH/2; p4rampW=max(min(p4clawW-3,4),2.5); p4rampMinkD=(p4rampW/3)*2; //minkoski diameter p4rampWm=p4rampW-p4rampMinkD; p4clear=-0.5; //distance above top of p4 from flipper in down position //need to fix -0.5? p4endtrim=0.5; echo("rampW", p4rampW); //space between rotating plates pPextra=1; //extra room below nC at lowest point pPspace2=nC+(p4baseH-p4basegapH)+pPextra; //space between geared plate and mountain plate, needle nC? //12 //p5 small bearing holder p5boltHeadOD=8; //look up sales drawing - used to cut mountain p5boltHeadH=3.65; //look up sales drawing - used to cut mountain p5nutH=3; //jam nut p5boltD=5; p5boltL=25; //bolt to hold bearings p5wingW=7; p5wingL=p5boltHeadH+p5boltL; p5wingH=3; p5bodyW=bearingholderSmallBOD+6; p5bodyL=p5boltL-p5nutH; p5bearCl=1.5; //distance from top of body to OD of bearing p5bodyH=bearingholderSmallgapclear+bearingholderSmallBOD-p5bearCl; p5wiggleL=0.4; //clearnace around bearing p5wiggleW=0.25; //clearnace around bearing p5bearingfromwall=4.25; p5mountholeOD=3; //mounting bolt OD p5mountBoltHeadOD=5.68; pPspace1=bearingholderSmallgapclear+bearingholderSmallBOD+bearingholderSmallgaproll; //? space from main table top to first plate - calc w/ bearing holder height, stepper motor shaft length? //made max of bearing holder, and p3wall45H? echo("pPspace1",pPspace1); p1H=pPspace1+pPplate1+1; //p6 big bearing holder - depricated p6wingW=30; p6wingL=25; p6wingH=3; p6bodyW=16; p6bodyL=25; p6bodyH=9.5; p6wiggleL=0.4; p6wiggleW=0.6; p6bearingfromwall=4.25; p6mountholeOD=3; p6mountholeHeadOD=5.68; //OD of socket screw head p6mounthole2front=8; p6mounthole2side=3; //p7 Z bearing holder - need to tweak more for different size bearings //bearing bolt p7boltHeadOD=8; //look up sales drawing - used to cut mountain p7boltHeadH=3.65; //look up sales drawing - used to cut mountain p7nutH=2.7; //jam nut p7boltD=5; p7boltL=16; //bolt to hold bearings p7baseH=4; p7wallW=3; p7mountH=bearingholderZBOD-2; p7mountholeOD=3; p7mountholeHeadOD=5.68; p7mountnutOD=6.01; p7mountnutH=3; p7mounthole2edge=4.5; p7bearingfromfront=3; p7wiggleL=0.4; p7wiggleW=0.25; p7baseW=bearingholderZBOD+8; //16 p7baseL=max((((p7bearingfromfront+bearingholderZBW+p7bearingfromfront)*2)+p7wallW),(p7mountholeHeadOD*2)+p7wallW,(p7mounthole2edge*2)+p7wallW); //23 p7mountL=(p7baseL-p7wallW)/2; //13 echo("suggested boltL for Z bearing", ceil(((((p7baseL-p7wallW)/2)+p7wallW+p7nutH)/2))*2 ); //p8 plate connector p8boltHeadOD=5.68; //look up sales drawing - used to cut mountain p8boltHeadH=3; //look up sales drawing - used to cut mountain p8nutH=4; //jam nut p8boltD=3; p8boltL=30; //bolt to hold bearings ???? p8baseW=8; p8holeD=p8boltD; p8H=pPspace2; echo("suggested boltL for spacer", ceil((upper_surfaceH+pPspace2+bottom_surface_motor_gearsH+p8nutH)/5)*5 ); //20,22,25,30 commonly availabble //p9 outer connector p9thickness=3; p9H=10; //mountain pMwallT=9; //min thickness from groove to back wall //7.5 //10 pMgroove=nH-nY-p3wallW+1; //depth of groove pMgrooveSlop=0.5; //height slop of groove pMgrooveD=nC+pMgrooveSlop; //Z plane diamter of groove cut pMgrooveAngle=45; // only 45 is working pMgrooveC1=pPspace2; //top of groove at position 1 "entrance" pPspace2 /////////// pMgrooveC2=nC+pPextra; //top of groove at position 2 "push down" nC+2 //////////// echo("pushdown distance",pPspace2-(nC+pPextra)); threadthickness=0.5; //approx used to leave space above p2 pMgrooveC3=pMgrooveC2+(pMgrooveD-nC)-(nG+threadthickness)+(p4baseH-p4basegapH)+p4rampH+p4clear+nF; //top of groove at position 3 "top center" calc! //44.25 pMwallHextra=5.75; //extra height above groove at heighest point pMH=pMwallHextra+pMgrooveC3; //total height of mountain pMshelfH=4; //thickness of shelf resting on top of c3 - depricated pMshelfchamfR=6; //radius of chamfer at join shelf/wall pMshelfBoltD=3; pM3c2c=(pMH-(aaboltHD/2)-5)-((pPspace2+pPplate2+1)+(aaboltHD/2)+bearingholderZBOD); pM3c2e=min( pMH-(pMH-(aaboltHD/2)-5) , ((pPspace2+pPplate2+1)+(aaboltHD/2)+bearingholderZBOD) -(pMshelfchamfR+pPspace2+pPplate2) ); //distance between bolts + 2X the min distance from bolt to top or bolt to bottom pM3H=( pM3c2c +(2*min( pMH-(pMH-(aaboltHD/2)-5) , ((pPspace2+pPplate2+1)+(aaboltHD/2)+bearingholderZBOD) -(pMshelfchamfR+pPspace2+pPplate2) )) ); pM3mink=6; pM3slop=0.25; //c2 geared plate - clean up below, not used to generate gear c2H=bottom_surface_motor_gearsH; c2gap=0.6; //gap between c2ID and p3wallOD // 0.7? 0.5? 0.35? how low can you go? c2t2t=6.858; c2width=50; //depricated? c2OD=(c2width*2)+(c2gap*2)+p2OD+(p3wiggle*2)+(p3wallW*2); c2ID=(c2gap*2)+p2OD+(p3wiggle*2)+(p3wallW*2); //should this be p3wallOD+(c2gap*2) c2teeth=((c2OD*PI)/c2t2t); c2dipitch=c2teeth/(c2OD*PI); cWiggle=0.1; //extra height on mountaint cutout for c3 to sit in ?? is this used ?? ///////////////////// //calculated settings ///////////////////// bearingholderZB2C=(bearingholderZBOD/2)+pPspace1+pPplate1+pPspace2+pPplate2; //from base of bearing holder to center of bearing rez=p2number*p2needles*2; centerlineD=p2ID+(p2W+(p3wiggle*2)); p3grooveH1=pPspace1+pPplate1; //bottom of verticle groove in p3 p3grooveH2=pPspace1+pPplate1+pMgrooveC3; //top of groove in p3 p4baseOD=centerlineD+p4baseW; p4baseID=centerlineD-p4baseW; p4basegapOD=centerlineD+p4basegapW; p4basegapID=centerlineD-p4basegapW; //firstcenter=(((((360/p2number/p2needles/2)/360*(p2OD*PI))-(needleWidth/2))/((360/p2number/p2needles/2)/360*(p2OD*PI)))*(360/p2number/p2needles/2))/2; //doesnt work on narrow needle arrangement, moved to second gap p2H=pPspace1+pPplate1+pMgrooveC2+(nA-nC-nB-nG)-threadthickness-p3base45H; p3wallH=pPspace1+pPplate1+pMgrooveC2+nA-nB-nC-nF-p3clear; p2holeH=p3grooveH2+((p3wallH-p3grooveH2)/2); //hight from table top //c3 c3ID=c2ID; c3H=upper_surfaceH; pMID=c2ID; pMODwall=c2ID+(pMgroove*2)+(pMwallT*2); //c4 paper clip connecting weight holder plate c4OD=p2ID-(p3ridgeW2*2)-(20*2); c4paperclipholeD=5; c4paperclipholeW=2; c4paperclipholetoEdge=3; ///////////////////////////////// pMgrooveOR=pMgroove+(pMID/2); //center to OD of groove // is this supposed to be the radius? ///////////////////////////////// //////////////////////// // MOUNTAIN VARIABLES // //////////////////////// mult=20; //rough multiplier 5-30 grez=rez*mult; //number of sides of groove path main circle gdeg=360/grez; //standard fraction of a degree per groove rez glen=(pMID*PI)/grez; //length of arc of each rez's fraction of a degree glnd=glen/gdeg; //length of standard fraction of a degree gcho=2*(pMID/2)*sin(gdeg/2); //chord length of glnd garc=gdeg*(pMID/2); //arc length... too close to get to smaller digits that are diff? echo("rez", rez); echo("grez", grez); echo("gdeg", gdeg); echo("glen", glen); echo("glnd", glnd); echo("pMgrooveC3", pMgrooveC3); //radius of upper curved path in groove //14 //10 pMgrooveturnR=UPpMgrooveturnR; //radius of lower curved path in groove //7 pMgrooveturnR2=UPpMgrooveturnR2; pMgrooveturnR3=7; // radius of entrance curved path - not used pMcutRez=2; //cuts per degree pMcutcylRez=36; //number of sides on groove cutting clylinder pMcutA=45; //angle of cut path //7 pMp7X=UPpMp7X; //half of length of plateu of groove. preferably whole number //3 //2 pMd7=pMp7X/glnd; //number of degrees for entire groove7 pMd7s=0; //degree turn to center of groove pMd7e=pMd7; //highest degree turn for section 7 pMh7s=pMgrooveC3-(pMgrooveD/2); //height of center of groove pMh7e=pMgrooveC3-(pMgrooveD/2); //6 pMp6X=cos(90-pMcutA)*pMgrooveturnR; pMd6=pMp6X/glnd; pMd6s=pMd7e; pMd6e=pMd7e+pMd6; function func6(i) = (pMgrooveturnR*cos(asin(((i-pMd6s)*(pMp6X/pMd6))/pMgrooveturnR))-pMgrooveturnR); pMh6s=pMh7e; pMh6e=pMh7e+func6(pMd6e); //5 pMh5s=pMh6e; pMh5e=0; pMp5X=(pMh5s-pMh5e)*tan(90-pMcutA); pMd5=pMp5X/glnd; pMd5s=pMd6e; pMd5e=pMd6e+pMd5; //4 pMh4e=pMgrooveC2-(pMgrooveD/2); pMp55X=(pMgrooveturnR2*tan(90-pMcutA))-(pMgrooveturnR2*sin(90-pMcutA))+(pMh4e/tan(90-pMcutA)); pMd55=pMp55X/glnd; pMp4X=cos(90-pMcutA)*pMgrooveturnR2; /////////problem with non-45 angles, p55X? pMd4=pMp4X/glnd; pMd4s=pMd5e-pMd55; pMd4e=pMd5e-pMd55+pMd4; function func4(i) = -(pMgrooveturnR2*cos(asin(((pMd4e-i)*(pMp4X/pMd4))/pMgrooveturnR2))-pMgrooveturnR2); pMh4s=func4(pMd4s); //3 pMp3X=UPpMp3X; //length of lower plateu of groove //2.5 //2 pMd3=pMp3X/glnd; //number of degrees for groove section 3 pMd3s=pMd4e; //degree turn to center of groove pMd3e=pMd4e+pMd3; //highest degree turn for section 7 pMh3s=pMh4e; //height of center of groove pMh3e=pMh4e; //2 pMp2X=cos(pMcutA)*pMgrooveturnR2; pMd2=pMp2X/glnd; pMd2s=pMd3e; pMd2e=pMd3e+pMd2; function func2(i) = -(pMgrooveturnR2*cos(asin(((i-pMd2s)*(pMp2X/pMd2))/pMgrooveturnR2))-pMgrooveturnR2); pMh2e=pMh3e+func2(pMd2s); pMh2s=pMh3e; //1 pMh1s=pMh2e; pMh1e=pMgrooveC1-(pMgrooveD)+((pMgrooveD/2)-(sin(pMcutA)*(pMgrooveD/2))); //-(cos(pMcutA)*pMgrooveturnR3); //-(pMgrooveD/2) pMp1X=((pMh1e)-(pMh1s))*tan(90-pMcutA); //-sin(45)*grooveD/2 ?? pMd1=pMp1X/glnd; pMd1s=pMd2e; pMd1e=pMd2e+pMd1; echo("extra to subtract??",sin(pMcutA)*(pMgrooveD/2)); //0 // pMp0X=pMgrooveD/2; //pMgrooveD // pMd0=pMp0X/glnd; //pMgrooveD/glnd; //define later pMp0X=0; pMd0=pMp0X/glnd; pMd0s=pMd1e; pMd0e=pMd1e+pMd0; //pM0 attempt to make curve below /* pMp0X=cos(90-pMcutA)*pMgrooveturnR3; pMd0=pMp0X/glnd; pMd0s=pMd1e; pMd0e=pMd1e+pMd0; function func0(i) = (pMgrooveturnR3*cos(asin(((i-pMd0e)*(pMp0X/pMd0))/pMgrooveturnR3))-pMgrooveturnR3); pMh0s=pMh1e; pMh0e=pMh1e+func0(pMd0e); */ //mounting shelf and holes settings pMshelfX=pMshelfBoltD*4; //length of shelf in mm pMshelfd=pMshelfX/glnd; //number of degrees of shelf pMdS=(pMgrooveD/2)/glnd; //to trim half pMdSs=pMd1e+pMdS; pMshelfHole1X=pMshelfchamfR+(pMshelfBoltD*1.5); //distance to hole center from main body pMshelfHole1d=(pMshelfHole1X/glen)*gdeg; //number of degrees from edge to hole center pMshelfHole2X=pMshelfX-(pMshelfBoltD*1.5); //distance to hole center from main body pMshelfHole2d=(pMshelfHole2X/glen)*gdeg; //number of degrees from edge to hole center pMextman=0.0002; //increase size of filler piece to make part manifold correctly //END MOUNTAIN VARS /////////////////////// //c3 - redo with extra mountian tab/shelf distance c3OD= max( ((pow((pow(((((c2ID+(pMgroove*2)+(pMwallT*2))/2)*cos(90-(pMd1e-pMd0)))+pMshelfX),2)+pow((((c2ID+(pMgroove*2)+(pMwallT*2))/2)),2)),1/2))*2)+((p7mountL+p7boltHeadH)*2) , ((((p3baseOD/2)+1+p5wingL+1+p7bearingfromfront+(p7wiggleL/2)+bearingholderZBW))*2) ); //removed following, going to shrink p8 as needed //(((pMID/2)+(pMgroove)+1+(p8baseL/2)+(p8holeC2C/2)+(p8holeD*1.25)+(p7mountL))*2) //MAX() of distance from mountain, and distance from plate spacers bolts //need to consider tooth size on plate c2 ?? echo("X", ((((c2ID+(pMgroove*2)+(pMwallT*2))/2)*cos(90-(pMd1e-pMd0)))+pMshelfX)); echo("Y", ((c2ID+(pMgroove*2)+(pMwallT*2))/2)); echo("c3OD=", c3OD); pMODshelf=c3OD; pMarcL=((PI*c2ID)*((pMd1e-pMd0)*2)/360); //approx arc length of mountain - could get more accurate number echo("pMarcL",pMarcL); pMmaxNum=floor((PI*c2ID)/pMarcL); //max number of mountains around circumference echo("pMmaxNum",pMmaxNum); pMnum=floor(pMmaxNum/2); echo("pMnum",pMnum); //number of sets of bearings mounted to geared plated c2bmounts=pMnum; //p3number //probably should be higher echo("c2bmounts",c2bmounts); p7number=(ceil(max( c2bmounts*1.3, 4 )/4))*4; echo("p7number", p7number); //number of plate connectors c2connectors=c2bmounts*3; // need to tweak so does not overlap mountain footprint /////gear calcs///// //solve for # of teeth and circ_pitch that gives proper tooth whole depth Td=5; //tooth depth-ish? - used to calculate # teeth large gear and pitch Tn=floor(((-2*c3OD)/((c3OD-Td)-c3OD))-2); //number of teeth? - for big gear pCir=180*(c3OD-(Td))/Tn; //circular pitch - use for both big and small gear CKp1_circular_pitch=pCir; CKp1_number_of_teeth=spurgearTn; CKp1_pitch_diameter = CKp1_number_of_teeth * CKp1_circular_pitch / 180; CKp1_pitch_radius = CKp1_pitch_diameter/2; CKc2_circular_pitch=pCir; CKc2_number_of_teeth=Tn; CKc2_pitch_diameter = CKc2_number_of_teeth * CKc2_circular_pitch / 180; CKc2_pitch_radius = CKc2_pitch_diameter/2; echo("c3OD",c3OD); echo("Tn",Tn); echo("pitch",180*(c3OD-(Td))/Tn); echo("pCir",pCir); p5mounthole2front=(p5mountBoltHeadOD/2)+Td; p5mounthole2back= max( (p5mountBoltHeadOD/2)+(((pMID+(pMgroove*2))-(p3baseOD+2))/2) , (p5mountBoltHeadOD/2)+4 ); //p8 p8holeend2C=4; p8innerboltO2C=(c2ID/2)+pMgroove+1+p8holeend2C; //radius of origin to center of inner bolt p8outerboltO2C=min( (c3OD/2)-p7bearingfromfront-(p7wiggleL/2)-bearingholderZBW-p7boltHeadH-1-(p8boltHeadOD/2) , CKc2_pitch_radius-(Td/2)-1-p8holeend2C ); //radius of origin to center of outer bolt p8holeC2C=p8outerboltO2C-p8innerboltO2C; //p8baseL-(p8holeend2C*2) p8baseL=p8holeC2C+(p8holeend2C*2); //25 //c1 c1H=table_surface; c1width=c2width+91.36; //depricated? c1OD=(CKp1_pitch_radius+CKc2_pitch_radius+(NEMAmotorW/2)+woodbeamW+2)*2; // c2OD + (c1width-c2width); c1zOD=(((c3OD/2)-p7bearingfromfront-(p7wiggleL/2)-bearingholderZBW+(p7baseL-p7mounthole2edge))+woodbeamW+2)*2; //outside diameter of plate at Z mounts c1W=max( c1OD*(-ceil(1/(floor( (2-c1steppersnumber)*(c1steppersnumber/(2/c1steppersnumber)) )+1))+1) , c3OD ); test=1; echo("floor", (-ceil(1/(floor( (2-c1steppersnumber)*(c1steppersnumber/(2/c1steppersnumber)) )+1))+1) ); //if there are more than 2 steppers = 1 echo("c3OD",c3OD); echo("c1W",c1W); //p2 flat socket head screw p2p3flatORmax=((c2ID+sqrt((-4*(p2p3flatHD/2)*(p2p3flatHD/2))+((c2ID)*(c2ID))))/2)/2; //maximum radius to be within c2ID //thread feeder M2tipY=tipOpenX/2; //pM2mink M2tipZ=(((tipOpenX/2)-(nE/2))*2)+tipHole+(tipcylD/2); M2tiptopC=(((tipOpenX/2)-(nE/2))*2)+tipHole+(tipcylD/2)-(pM2mink/4); M2inX=((((c2ID+(pMgroove*2)+(pMwallT*2))/2)*cos(90-(pMd1e-pMd0)))-pMshelfchamfR-(aaX-aaT))*2; M2inY=(((c2ID+(pMgroove*2)+(pMwallT*2))/2))-((p3wallID/2)-(p2needlegrooveDepthslop/2))-(nD-nY)-nD; //(M2tipY) //(nD-nY) //tipcylD/2 M2inZ=pM2H-pM2mink; M2backwallOD=((c2ID+(pMgroove*2)+(pMwallT*2))/2)+aaT; ////SETTINGS OUTPUT ECHOS/// echo("Total Needles:", p2number*p2needles); echo("Millimeters Between Needles:", PI*p2needlegrooveID/(p2number*p2needles)); echo("OD of p3:", p3baseOD); echo("OD of c1:", c2OD+(c1width-c2width)); /////BOM COUNT/////// if(TF==1){ echo("Thread Feeder Mount Bolt: (2)", (ceil(((((pMID/2)-(cos(pMd4s)*(pMID/2)))+pMwallT+pMgroove)-(sin(pMd4s)*(aaboltHD))-2-aaboltHH+aaT+aanutH)/2)*2) ); }
Needles
CKneedleVars-KH820.scad
- http://shop.sckmcl.com.hk/product_info.php?cPath=40&products_id=145
- https://www.aliexpress.com/item/32870943672.html
//NEEDLE for Brother KH820 //measurements by dorkmo nX=1.20; //typical thickness from side to side nY=1.83; //typical thickness from front to back nA=137.15; //total length of needle nB=53.7; //distance from bottom of needle to bottom of bent tab. nC=3.75; //thickness of bent tab. top to bottom. nD=3.6; //hook front to back nE=2.95; //from top of loop to bottom of hook nF=17.04; //from top of loop to bottom of flipper in down position nG=0.85; //minimum thickness of hook. front to back. nH=17.00; //max distance from front to back nT=0; //0=straight tail 1=bent tail aka folded back. Y of tail = C if T=1.
CKneedleVars-KH260.scad
- purchased here: http://shop.sckmcl.com.hk/product_info.php?products_id=136
//NEEDLE for Brother KH260 //measurements by dorkmo nX=1.4; //typical thickness from side to side nY=2.44; //typical thickness from front to back nA=157.9; //total length of needle nB=53; //distance from bottom of needle to bottom of bent tab. nC=4.82; //thickness of bent tab. top to bottom. nD=5.48; //hook front to back nE=4.10; //from top of loop to bottom of hook nF=22.0; //from top of loop to bottom of flipper in down position nG=1.10; //minimum thickness of hook. front to back. nH=17.03; //max distance from front to back nT=0; //0=straight tail 1=bent tail aka folded back. Y of tail = C if T=1.
CKneedleVars-SK120.scad
- difficult to find these exact needles for sale
//NEEDLE for SK120 //measured by original CircularKnitic team nX=1.4; //typical thickness from side to side nY=2.44; //typical thickness from front to back nA=97.73; //total length of needle nB=7.72; //distance from bottom of needle to bottom of bent tab. nC=4.92; //thickness of bent tab. top to bottom. nD=5.09; //hook front to back nE=4.62; //from top top loop to bottom of hook nF=19.94; //top to bottom of flipper in down position nG=1.04; //minimum thickness of hook. front to back. nH=16.4; //max distance from front to back nT=0; //0=straight tail 1=bent tail aka folded back. Y of tail = C of T=1.
3D Prints
- Parts to be printed on the 3D printer
CKp1.scad "motor gear"
- Uses 2 parts
- M3 Square Nut
- M3x8 Bolt, 6 or 10 might work
- need to fix "child()" OpenScad error
include <CKvars.scad>; use <CKc3--topplate.scad> ////// //=BOM= //M3 Square Nut https://www.fastenal.com/products/details/0161907 //M3x8 Bolt https://www.fastenal.com/products/details/86002 ////// rez=p2number*p2needles*2; //calculate desired rezolution $fn=rez; //defines resolution of circles. pi=3.1415926535897932384626433832795; mirror([0,0,1]) CKp1(); module CKp1(){ difference(){ union(){ difference(){ gear (circular_pitch=pCir, gear_thickness = p1H, rim_thickness = p1H, hub_thickness = p1H, circles=0); cylinder(h=p1H+2,d=NEMAshaftOD); // donut hole difference(){ cylinder(d=c3OD,h=pPspace1-1); cylinder(d=NEMAfaceCricOD+2,h=pPspace1-1); } }//end difference //flat shaft face rotate([0,0,360/spurgearTn/2]) translate([(NEMAshaftOD/2)-NEMAshaftCut,-NEMAshaftOD/2,0]) cube([NEMAshaftOD,NEMAshaftOD,p1H]); }//end union //square nut hole rotate([0,0,360/spurgearTn/2]) translate([(NEMAshaftOD/2)-NEMAshaftCut+1.5-(NEMAsqNutSlop/2),-((NEMAsqNutW+NEMAsqNutSlop)/2),0]) cube([NEMAsqNutH+NEMAsqNutSlop,NEMAsqNutW+NEMAsqNutSlop,pPspace1-1]); rotate([0,0,360/spurgearTn/2]) translate([0,0,(pPspace1-1)/2]) rotate([0,90,0]) cylinder(d=NEMAsetboltOD,h=NEMAfaceCricOD/2); rotate([0,0,360/spurgearTn/2]) translate([(NEMAshaftOD/2)-NEMAshaftCut+NEMAsetboltL-0.5,0,(pPspace1-1)/2]) rotate([0,90,0]) cylinder(d=NEMAsetHeadOD+1,h=NEMAfaceCricOD/2); }//end difference }//end module // Parametric Involute Bevel and Spur Gears by GregFrost // It is licensed under the Creative Commons - GNU LGPL 2.1 license. // © 2010 by GregFrost, thingiverse.com/Amp // http://www.thingiverse.com/thing:3575 and http://www.thingiverse.com/thing:3752 //================================================== // Bevel Gears: // Two gears with the same cone distance, circular pitch (measured at the cone distance) // and pressure angle will mesh. module gear ( number_of_teeth=spurgearTn, circular_pitch=false, diametral_pitch=false, pressure_angle=28, clearance = 0.2, gear_thickness=5, rim_thickness=8, rim_width=5, hub_thickness=10, hub_diameter=15, bore_diameter=5, circles=0, backlash=0, twist=0, involute_facets=0, flat=false) { if (circular_pitch==false && diametral_pitch==false) echo("MCAD ERROR: gear module needs either a diametral_pitch or circular_pitch"); //Convert diametrial pitch to our native circular pitch circular_pitch = (circular_pitch!=false?circular_pitch:180/diametral_pitch); // Pitch diameter: Diameter of pitch circle. pitch_diameter = number_of_teeth * circular_pitch / 180; pitch_radius = pitch_diameter/2; echo ("Teeth:", number_of_teeth, " Pitch radius:", pitch_radius); // Base Circle base_radius = pitch_radius*cos(pressure_angle); // Diametrial pitch: Number of teeth per unit length. pitch_diametrial = number_of_teeth / pitch_diameter; // Addendum: Radial distance from pitch circle to outside circle. addendum = 1/pitch_diametrial; //Outer Circle outer_radius = pitch_radius+addendum; //Use if statement and mix/max to select tooth count and circular pitch that creates a radius that is smaller than the OD of the CKp3 //circular pitch defined bt ckp3OD. number of teeth calculated for target addendum. echo("radius",outer_radius); // Dedendum: Radial distance from pitch circle to root diameter dedendum = addendum + clearance; // Root diameter: Diameter of bottom of tooth spaces. root_radius = pitch_radius-dedendum; backlash_angle = backlash / pitch_radius * 180 / pi; half_thick_angle = (360 / number_of_teeth - backlash_angle) / 4; // Variables controlling the rim. rim_radius = root_radius - rim_width; // Variables controlling the circular holes in the gear. circle_orbit_diameter=hub_diameter/2+rim_radius; circle_orbit_curcumference=pi*circle_orbit_diameter; // Limit the circle size to 90% of the gear face. circle_diameter= min ( 0.70*circle_orbit_curcumference/circles, (rim_radius-hub_diameter/2)*0.9); difference() { union () { difference () { linear_exturde_flat_option(flat=flat, height=rim_thickness, convexity=10, twist=twist) gear_shape ( number_of_teeth, pitch_radius = pitch_radius, root_radius = root_radius, base_radius = base_radius, outer_radius = outer_radius, half_thick_angle = half_thick_angle, involute_facets=involute_facets); if (gear_thickness < rim_thickness) translate ([0,0,gear_thickness]) cylinder (r=rim_radius,h=rim_thickness-gear_thickness+1); } if (gear_thickness > rim_thickness) linear_exturde_flat_option(flat=flat, height=gear_thickness) circle (r=rim_radius); if (flat == false && hub_thickness > gear_thickness) translate ([0,0,gear_thickness]) linear_exturde_flat_option(flat=flat, height=hub_thickness-gear_thickness) circle (r=hub_diameter/2); } translate ([0,0,-1]) linear_exturde_flat_option(flat =flat, height=2+max(rim_thickness,hub_thickness,gear_thickness)) circle (r=bore_diameter/2); if (circles>0) { for(i=[0:circles-1]) rotate([0,0,i*360/circles]) translate([circle_orbit_diameter/2,0,-1]) linear_exturde_flat_option(flat =flat, height=max(gear_thickness,rim_thickness)+3) circle(r=circle_diameter/2); } } } module linear_exturde_flat_option(flat =false, height = 10, center = false, convexity = 2, twist = 0) { if(flat==false) { linear_extrude(height = height, center = center, convexity = convexity, twist= twist) child(0); } else { child(0); } } module gear_shape ( number_of_teeth, pitch_radius, root_radius, base_radius, outer_radius, half_thick_angle, involute_facets) { union() { rotate (half_thick_angle) circle ($fn=number_of_teeth*2, r=root_radius); for (i = [1:number_of_teeth]) { rotate ([0,0,i*360/number_of_teeth]) { involute_gear_tooth ( pitch_radius = pitch_radius, root_radius = root_radius, base_radius = base_radius, outer_radius = outer_radius, half_thick_angle = half_thick_angle, involute_facets=involute_facets); } } } } module involute_gear_tooth ( pitch_radius, root_radius, base_radius, outer_radius, half_thick_angle, involute_facets) { min_radius = max (base_radius,root_radius); pitch_point = involute (base_radius, involute_intersect_angle (base_radius, pitch_radius)); pitch_angle = atan2 (pitch_point[1], pitch_point[0]); centre_angle = pitch_angle + half_thick_angle; start_angle = involute_intersect_angle (base_radius, min_radius); stop_angle = involute_intersect_angle (base_radius, outer_radius); res=(involute_facets!=0)?involute_facets:($fn==0)?5:$fn/4; union () { for (i=[1:res]) assign ( point1=involute (base_radius,start_angle+(stop_angle - start_angle)*(i-1)/res), point2=involute (base_radius,start_angle+(stop_angle - start_angle)*i/res)) { assign ( side1_point1=rotate_point (centre_angle, point1), side1_point2=rotate_point (centre_angle, point2), side2_point1=mirror_point (rotate_point (centre_angle, point1)), side2_point2=mirror_point (rotate_point (centre_angle, point2))) { polygon ( points=[[0,0],side1_point1,side1_point2,side2_point2,side2_point1], paths=[[0,1,2,3,4,0]]); } } } } // Mathematical Functions //=============== // Finds the angle of the involute about the base radius at the given distance (radius) from it's center. //source: http://www.mathhelpforum.com/math-help/geometry/136011-circle-involute-solving-y-any-given-x.html function involute_intersect_angle (base_radius, radius) = sqrt (pow (radius/base_radius, 2) - 1) * 180 / pi; // Calculate the involute position for a given base radius and involute angle. function rotated_involute (rotate, base_radius, involute_angle) = [ cos (rotate) * involute (base_radius, involute_angle)[0] + sin (rotate) * involute (base_radius, involute_angle)[1], cos (rotate) * involute (base_radius, involute_angle)[1] - sin (rotate) * involute (base_radius, involute_angle)[0] ]; function mirror_point (coord) = [ coord[0], -coord[1] ]; function rotate_point (rotate, coord) = [ cos (rotate) * coord[0] + sin (rotate) * coord[1], cos (rotate) * coord[1] - sin (rotate) * coord[0] ]; function involute (base_radius, involute_angle) = [ base_radius*(cos (involute_angle) + involute_angle*pi/180*sin (involute_angle)), base_radius*(sin (involute_angle) - involute_angle*pi/180*cos (involute_angle)) ];
CKp2.scad "inner"
- need to fix hole matching with p4
include <CKvars.scad>; CKp2(); module CKp2(){ rez=p2number*p2needles*2; $fn=rez; //defines resolution of circles. translate([p2OD/2,0,0]){ difference(){ union(){ difference(){ cylinder(h=p2H,d=p2OD); cylinder(h=p2H,d=p2ID); } for(i=[0:p2needles+1]){ rotate([0,0,i*-360/p2number/p2needles]) translate([-(p2ID/2)-0.1,0,p2holeH-p3base45H]) rotate([0,90,0]) cylinder(h=p2p3flatD/6, d1=p2p3nutOD+p2p3flatD, d2=p2p3nutOD,$fn=36); } } translate([-p2OD/2,-p2OD/2,0]){ cube([p2OD,p2OD/2,p2H]); //trim side } rotate([0,0,-360/p2number]){ translate([-p2OD/2,0,0]) cube([p2OD,p2OD/2,p2H]); //trim other side } for(i=[1:p2needles]){ rotate([0,0,(360/p2number/p2needles/2)-(360/p2number/p2needles*i)]){ translate([-p2OD/2-0.2,-needleWidth/2,0]) cube([p2needlegrooveDepth+0.2,needleWidth,p2H]); } } for(i=[0:p2needles+1]){ rotate([0,0,i*-360/p2number/p2needles]) translate([-p2OD/2-0.2,0,p2holeH-p3base45H]) rotate([0,90,0]) cylinder(h=p2OD-p2ID+0.2, d=p2p3flatD,$fn=36); } echo(((((360/p2number/p2needles/2)/360*(p2OD*PI))-(needleWidth/2))/((360/p2number/p2needles/2)/360*(p2OD*PI)))*(360/p2number/p2needles/2)); //firstcenter=(((((360/p2number/p2needles/2)/360*(p2OD*PI))-(needleWidth/2))/((360/p2number/p2needles/2)/360*(p2OD*PI)))*(360/p2number/p2needles/2))/2; not using //end hole //p4 mount holes // 1st p4 mount hole rotate([0,0,-(360/p2number/p2needles)*2]){ translate([-p2OD/2-0.2,0,p2H-(p4basegapH-p4holeH)]) rotate([0,90,0]){ cylinder(h=p2OD-p2ID+0.2, d=p2p4flatD,$fn=36); } } //2nd p4 mount hole // 2nd hole rotate([0,0,-(360/p2number/p2needles)*3]){ translate([-p2OD/2-0.2,0,p2H-(p4basegapH-p4holeH)]) rotate([0,90,0]){ #cylinder(h=p2OD-p2ID+0.2, d=p2p4flatD,$fn=36); } } //end p4 mount holes //trim end of part if(p2number>1){ rotate([0,0,-(360/(p2OD*PI/p2endtrim))]) mirror([1,1,0]) #cube([p2OD/2,p2OD/2,p2H]); } } //end main difference } //end main translate } //end module
CKp3.scad "outer"
- could make base bolt similar to p7 with bolt in sloped wall.
- coul move closer to p3wallOD
- what to do if needle has bent back tail?
include <CKvars.scad>; /* /////////////////// use <CKneedle.scad>; rotate([0,0,(360/p2number*p2needles/2)]){ translate([0,0,-nB+(pPspace1+pPplate1)]) rotate([0,0,(360/(p2number*p2needles))*1]) translate([(p2needlegrooveDepthslop/2),0,0]) translate([0,nX/2,0]) rotate([90,0,0]) needle(); translate([0,0,-nB+(pPspace1+pPplate1+pMgrooveC1-nC)]) rotate([0,0,(360/(p2number*p2needles))*2]) translate([(p2needlegrooveDepthslop/2),0,0]) translate([0,nX/2,0]) rotate([90,0,0]) needle(); translate([0,0,-nB+(pPspace1+pPplate1+pMgrooveC2-nC)]) rotate([0,0,(360/(p2number*p2needles))*3]) translate([(p2needlegrooveDepthslop/2),0,0]) translate([0,nX/2,0]) rotate([90,0,0]) needle(); translate([0,0,-nB+(pPspace1+pPplate1+pMgrooveC3-nC)]) rotate([0,0,(360/(p2number*p2needles))*4]) translate([(p2needlegrooveDepthslop/2),0,0]) translate([0,nX/2,0]) rotate([90,0,0]) needle(); } /////////////////// */ translate([-p3baseOD/2,0,0]) CKp3(); echo("p3wallH",p3wallH); module CKp3(){ rez=p2number*p2needles*2; //p2number*p2needles*2 //p2number*2*2; $fn=rez; //defines resolution of circles. centerlineD=p2ID+(p2W+(p3wiggle*2)); echo(centerlineD); translate([p3baseOD/2,0,0]){ difference(){ union(){ cylinder(h=p3baseH,d=p3baseOD); cylinder(h=p3base45H,d=p3baseID); //ridge translate([0,0,p3base45H]) difference(){ cylinder(h=p3ridgeH,d=centerlineD-((p2W+(p3wiggle*2)/2))); translate([0,0,0]) cylinder(h=p3ridgeH,d1=centerlineD-(p3ridgeW2*2)-((p2W+(p3wiggle*2)/2)),d2=centerlineD-(p3ridgeW1*2)-((p2W+(p3wiggle*2)/2))); } //end diff difference(){ translate([0,0,p3baseH]) cylinder(h=p3wallchamfH,d1=centerlineD+((p3wallchamfW+p3wallW)*2)+((p2W+(p3wiggle*2)/2)),d2=centerlineD+(p3wallW*2)+((p2W+(p3wiggle*2)/2))); cylinder(h=p3wallchamfH+p3baseH,d=centerlineD+((p2W+(p3wiggle*2)/2))); } difference(){ cylinder(h=p3wallH,d=centerlineD+(p3wallW*2)+((p2W+(p3wiggle*2)/2))); cylinder(h=p3wallH,d=centerlineD+((p2W+(p3wiggle*2)/2))); } } //end main union cylinder(h=p3wallH,d=p3baseID-(p3base45W*2)+1); cylinder(h=p3base45H,d1=p3baseID,d2=p3baseID-(p3base45W*2)); translate([-p3baseOD/2,-p3baseOD/2,0]){ cube([p3baseOD,p3baseOD/2,p3wallH]); } rotate([0,0,-360/p3number]){ translate([-p3baseOD/2,0,0]) cube([p3baseOD,p3baseOD/2,p3wallH]); } //thin wall translate([0,0,p3grooveH2]) difference(){ cylinder(d=p3wallOD,h=p3wallH); cylinder(d=p3wallID+(p3upperwallW*2),h=p3wallH); cylinder(d1=p3wallOD,d2=p3wallID+(p3upperwallW*2),h=p2holeH-(p9H/2)-p3grooveH2-1); } //slots for(i=[1:p2needles*(p2number/p3number)]){ rotate([0,0,(360/p2number/p2needles/2)-(360/p2number/p2needles*i)]){ translate([((-centerlineD-(p3wallW*2)-((p2W+(p3wiggle*2)/2)))/2)-0.1,-p3grooveW/2,p3grooveH1-p3grooveHslop]) cube([p3wallW+0.2,p3grooveW,p3grooveH2-p3grooveH1+(p3grooveHslop*2)]); } } //base mounting holes for(i=[1:p3baseholenumber]){ rotate([0,0,(((360/p3number/p3baseholenumber))/2)-((360/p3number/p3baseholenumber)*i)]){ translate([-(p3baseOD/2)+p3baseholefromODID,0,0]) cylinder(h=p3baseH,d=p3baseholeD,$fn=18); } } //p2 flat head chamger mounting cuts for(i=[3:(p2needles*p2number/p3number)-3]){ rotate([0,0,(i*-360/(p2number*p2needles))+180]){ translate([p3upperwallW+(p3wallID/2),0,p2holeH]) rotate([0,270,0]) translate([0,0,0]) union(){ #cylinder(d1=p2p3flatHD,d2=0,h=(p2p3flatHD/2)/tan(45),$fn=36); translate([0,0,-(p2p3flatHD)/tan(45)]) cylinder(d1=p2p3flatHD*3,d2=p2p3flatHD,h=(p2p3flatHD)/tan(45),$fn=36); //cylinder(d=p2p3flatD,h=p3upperwallW+(p2W+(p3wiggle*2)/2)+p2p3nutH,$fn=36); } // translate([((-centerlineD-(p3wallW*2)-((p2W+(p3wiggle*2)/2)))/2)-0.1,0,p2holeH]) // rotate([0,90,0]){ // cylinder(h=p2OD-p2ID+0.2, d=p2holeD,$fn=36); // } //end rotate } //end rotate } //end for //p2 flat head chamger mounting cuts for(i=[0:2]){ rotate([0,0,(i*-360/(p2number*p2needles))+180]){ translate([p9thickness+p3upperwallW+(p3wallID/2),0,p2holeH]) rotate([0,270,0]) translate([0,0,0]) union(){ cylinder(d1=p2p3flatHD,d2=0,h=(p2p3flatHD/2)/tan(45),$fn=36); translate([0,0,-(p2p3flatHD)/tan(45)]) #cylinder(d1=p2p3flatHD*3,d2=p2p3flatHD,h=(p2p3flatHD)/tan(45),$fn=36); } //end union } //end rotate } //end for for(i=[(p2needles*p2number/p3number)-2:(p2needles*p2number/p3number)]){ rotate([0,0,(i*-360/(p2number*p2needles))+180]){ translate([p9thickness+p3upperwallW+(p3wallID/2),0,p2holeH]) rotate([0,270,0]) translate([0,0,0]) union(){ cylinder(d1=p2p3flatHD,d2=0,h=(p2p3flatHD/2)/tan(45),$fn=36); translate([0,0,-(p2p3flatHD)/tan(45)]) #cylinder(d1=p2p3flatHD*3,d2=p2p3flatHD,h=(p2p3flatHD)/tan(45),$fn=36); } //end union } //end rotate } //end for for(i=[0:(p2needles*p2number)]){ rotate([0,0,(i*-360/(p2number*p2needles))+180]){ translate([p3upperwallW+(p3wallID/2),0,p2holeH]) rotate([0,270,0]) translate([0,0,0]) union(){ cylinder(d=p2p3flatD,h=p3upperwallW+(p2W+(p3wiggle*2)/2)+p2p3nutH,$fn=36); } // translate([((-centerlineD-(p3wallW*2)-((p2W+(p3wiggle*2)/2)))/2)-0.1,0,p2holeH]) // rotate([0,90,0]){ // cylinder(h=p2OD-p2ID+0.2, d=p2holeD,$fn=36); // } //end rotate } //end rotate } //end for /* //p2 mounting holes flat chamfers for(i=[3:(p2needles*p2number/p3number)-3]){ rotate([0,0,(i*-360/(p2number*p2needles))]){ translate([p3upperwallW+(p3wallID/2),0,p2holeH]) rotate([0,270,0]) translate([0,0,0]) union(){ translate([0,0,-(p2p3flatHD)/tan(45)]) cylinder(d1=p2p3flatHD*3,d2=p2p3flatHD,h=(p2p3flatHD)/tan(45),$fn=36); cylinder(d=p2p3flatD,h=p3upperwallW+(p2W+(p3wiggle*2)/2)+p2p3nutH,$fn=36); } } } */ /* for(i=[0:(p2number/p3number)-1]){ rotate([0,0,(-360/p2number/p2needles*(p2needles-1))+(i*-360/p2number)]){ translate([((-centerlineD-(p3wallW*2)-((p2W+(p3wiggle*2)/2)))/2)-0.1,0,p2holeH]) rotate([0,90,0]){ #cylinder(h=p2OD-p2ID+0.2, d=p2holeD, $fn=18); } } }//end for */ //end middle holes //trim end of part if(p3number>1){ rotate([0,0,-(360/(p3baseOD*PI/p3endtrim))]) mirror([1,1,0]) cube([p3baseOD/2,p3baseOD/2,p3wallH]); } //base needle holes difference(){ for(i=[1:p2needles*(p2number/p3number)]){ rotate([0,0,(360/p2number/p2needles/2)-(360/p2number/p2needles*i)]){ translate([-(p3wallID/2),-p3grooveW*p3needleholefactorW/2,0]) #cube([(p3wallID/2),p3grooveW*p3needleholefactorW,p3base45H+p3ridgeH+1]); //Z = p3base45H } } difference(){ cylinder(d=p3wallOD,h=p3base45H+p3ridgeH+1); cylinder(d=p3wallID,h=p3base45H+p3ridgeH+1); } //cylinder(d=centerlineD-((p2W+(p3wiggle*2)/2)),h=p3base45H+p3ridgeH+1); } } //end main difference } //end main translate } //end module
CKp4.scad "yard holder"
include <CKvars.scad>; CKp4(); module CKp4(){ rez=p2number*p2needles*2; $fn=rez; //defines resolution of circles. translate([p4baseOD/2,0,0]){ difference(){ union(){ cylinder(h=p4baseH,d=p4baseOD-(p4basegapW*2)-((p4baseW-p4basegapW)/2*2)); //ramps for(i=[1:p2needles*(p2number/p4number)]){ rotate([0,0,(360/p2number/p2needles)-(360/p2number/p2needles*i)-(((360/p2number/p2needles))/2)]){ difference(){ minkowski(){ union(){ translate([-p4baseOD/2+p4rampfromOD,p4rampWm/2,p4rampH+p4baseH-(p4rampC1/2)]) rotate([90,0,0]) cylinder(h=p4rampWm,d=p4rampC1); intersection(){ translate([-10,0,3.82]) translate([-p4baseOD/2+p4rampfromOD,p4rampWm/2,p4rampH+p4baseH-(p4rampC2/2)]) rotate([90,0,0]) cylinder(h=p4rampWm,d=p4rampC2); translate([-7,0,-2.86/2]) translate([-p4baseOD/2+p4rampfromOD,p4rampWm/2,p4rampH+p4baseH-(p4rampC2/2)]) cube([p4rampC2,p4rampC2,p4rampC2],center=true); } }//end union difference(){ translate([-p4rampMinkD/2,0,0]) cylinder(d=p4rampMinkD,h=0.01, $fn=36); translate([-p4rampMinkD,0,-0.01]) cube([p4rampMinkD,p4rampMinkD,0.02], center=true); } //end diff } //end mink translate([-p4rampC2/2,0,0]) translate([-p4baseOD/2+p4rampfromOD,p4rampW/2,p4rampH+p4baseH-(p4rampC2/2)]) #cube([p4rampC2,p4rampC2,p4rampC2+1],center=true); translate([0,0,0]) translate([-p4baseOD/2+p4rampfromOD,p4rampW/2,p4baseH-(p4rampC2/2)-0.1]) cube([p4rampC2,p4rampC2,p4rampC2],center=true); translate([0,-p4clawW/2,0]) translate([-(p4baseID/2)-p4rampfromID,0,p4baseH]) cube([(p4baseID/2)+p4rampfromID,p4clawW,p4rampoverhangH]); translate([-7,0,0]) translate([-p4baseOD/2+p4rampfromOD,(p4rampW/2)+(p4rampC2/2)-0.01,p4rampH+p4baseH-(p4rampC2/2)]) cube([p4rampC2,p4rampC2,p4rampC2],center=true); translate([-7,0,0]) translate([-p4baseOD/2+p4rampfromOD,-(p4rampW/2)-(p4rampC2/2)+0.01,p4rampH+p4baseH-(p4rampC2/2)]) cube([p4rampC2,p4rampC2,p4rampC2],center=true); }//end ramps difference } //end for rotate } //end for //claws for(i=[1:p2needles*(p2number/p4number)]){ rotate([0,0,(360/p2number/p2needles)-(360/p2number/p2needles*i)-(((360/p2number/p2needles))/2)]){ translate([-p4baseOD/2,-p4clawW/2,0]) cube([(p4baseOD-p4baseID)/2,p4clawW,p4baseH]); } }//end for } //end main union cylinder(h=p4baseH,d=p4baseID); //simiple chamfer of inside corner translate([0,0,p4baseH-0.5]) cylinder(h=0.5,d1=p4baseID+0.5,d2=p4baseID+1.9); translate([0,0,p4baseH-0.5-0.5]) cylinder(h=0.5,d1=p4baseID,d2=p4baseID+0.5); translate([-p4baseOD/2,-p4baseOD/2,0]){ cube([p4baseOD,p4baseOD/2,p4baseH]); } rotate([0,0,-360/p4number]){ translate([-p4baseOD/2,0,0]) cube([p4baseOD,p4baseOD/2,p4baseH]); } difference(){ cylinder(h=p4basegapH,d=p4basegapOD); cylinder(h=p4basegapH,d=p4basegapID); } //mounting holes for(i=[0:(p2number/p4number)-1]){ rotate([0,0,(-360/p2number/p2needles*0.5)+(i*-360/p2number)]){ translate([-(p4baseOD/2)+((p4baseOD-p4baseID)/2),0,p4holeH]) rotate([0,270,0]) translate([0,0,0]) union(){ cylinder(d1=p2p4flatHD,d2=0,h=(p2p4flatHD/2)/tan(45),$fn=36); translate([0,0,-(p2p4flatHD)/tan(45)]) cylinder(d1=p2p4flatHD*3,d2=p2p4flatHD,h=(p2p4flatHD)/tan(45),$fn=36); cylinder(d=p2p4flatD,h=((p4baseOD-p4baseID)/2)+2,$fn=36); } } } //second set for(i=[0:(p2number/p3number)-1]){ rotate([0,0,-(360/p2number/p2needles*0.5)+(360/p2number/p2needles)+(i*-360/p2number)+(-360/p2number)]){ translate([-(p4baseOD/2)+((p4baseOD-p4baseID)/2),0,p4holeH]) rotate([0,270,0]) translate([0,0,0]) union(){ cylinder(d1=p2p4flatHD,d2=0,h=(p2p4flatHD/2)/tan(45),$fn=36); translate([0,0,-(p2p4flatHD)/tan(45)]) cylinder(d1=p2p4flatHD*3,d2=p2p4flatHD,h=(p2p4flatHD)/tan(45),$fn=36); cylinder(d=p2p4flatD,h=((p4baseOD-p4baseID)/2)+2,$fn=36); } } } //end mounting holes //trim end if(p4number>1){ rotate([0,0,-(360/(p4baseOD*PI/p4endtrim))]) mirror([1,1,0]) cube([p4baseOD/2,p4baseOD/2,p4rampH+p4baseH]); } } //end main difference } //end main translate } //end module
CKp5.scad "small bearing holder"
include <CKvars.scad>; CKp5(1); //small bearing holder module CKp5(B){ mirror([0,1,0]){ translate([-(p5wingW+p5bodyW+p5wingW)/2,-p5wingL,0]){ //bearing if(B==1){ translate([(p5wingW+p5bodyW+p5wingW)/2,p5bearingfromwall+(p5wiggleL/2)+p5boltHeadH,bearingholderSmallB2C]) rotate([270,0,0]) difference(){ cylinder(d=bearingholderSmallBOD,h=bearingholderSmallBW, $fn=36); cylinder(d=bearingholderSmallBID,h=bearingholderSmallBW, $fn=36); } translate([(p5wingW+p5bodyW+p5wingW)/2,p5bodyL-p5bearingfromwall-bearingholderSmallBW-(p5wiggleL/2)+p5boltHeadH,bearingholderSmallB2C]) rotate([270,0,0]) difference(){ cylinder(d=bearingholderSmallBOD,h=bearingholderSmallBW, $fn=36); cylinder(d=bearingholderSmallBID,h=bearingholderSmallBW, $fn=36); } //bolt translate([(p5wingW+p5bodyW+p5wingW)/2,p5boltHeadH,bearingholderSmallB2C]) rotate([-90,0,0]) rotate([0,0,360/6/2]) CKbolt(p5boltD,p5boltL,p5boltHeadH,p5boltHeadOD); //nut translate([(p5wingW+p5bodyW+p5wingW)/2,p5bodyL+p5boltHeadH,bearingholderSmallB2C]) rotate([-90,0,0]) rotate([0,0,360/6/2]) CKnut(p5boltD,p5nutH,p5boltHeadOD); } //end if difference(){ union(){ //wing left difference(){ cube([p5wingW,p5wingL,p5wingH]); //wing left holes translate([p5wingW/2,p5mounthole2front,0]) cylinder(d=p5mountholeOD,h=p5wingH+0.1,$fn=36); translate([p5wingW/2,p5wingL-p5mounthole2back,0]) cylinder(d=p5mountholeOD,h=p5wingH+0.1,$fn=36); } //end wing left difference //body translate([p5wingW,p5boltHeadH,0]){ difference(){ cube([p5bodyW,p5bodyL,p5bodyH]); // bearing cutout 1 translate([((p5bodyW)/2)-((bearingholderSmallBOD+p5wiggleW)/2),p5bearingfromwall,0]) cube([bearingholderSmallBOD+p5wiggleW,bearingholderSmallBW+p5wiggleL,p5bodyH+0.1]); // bearing cutout 2 translate([((p5bodyW)/2)-((bearingholderSmallBOD+p5wiggleW)/2),p5bodyL-p5bearingfromwall-(bearingholderSmallBW+p5wiggleL),0]) cube([bearingholderSmallBOD+p5wiggleW,bearingholderSmallBW+p5wiggleL,p5bodyH+0.1]); // bore hole cutout translate([(p5bodyW)/2,-0.1,bearingholderSmallB2C]) rotate([270,0,0]) cylinder(d=bearingholderSmallBID,h=p5bodyL+0.2,$fn=36); } //end body difference } //end body translate //wing right translate([p5wingW+p5bodyW,0,0]){ difference(){ cube([p5wingW,p5wingL,p5wingH]); //wing right holes translate([p5wingW/2,p5mounthole2front,0]) cylinder(d=p5mountholeOD,h=p5wingH+0.1,$fn=36); translate([p5wingW/2,p5wingL-p5mounthole2back,0]) cylinder(d=p5mountholeOD,h=p5wingH+0.1,$fn=36); } //end wing right difference } //end wing right translate } difference(){ translate([(-(((c3OD/2)-p7bearingfromfront-(p7wiggleL/2)-bearingholderZBW))/2)+((p5wingW+p5bodyW+p5wingW)/2),0,0]) cube([((c3OD/2)-p7bearingfromfront-(p7wiggleL/2)-bearingholderZBW),((c3OD/2)-p7bearingfromfront-(p7wiggleL/2)-bearingholderZBW),p5bodyH]); translate([(p5wingW+p5bodyW+p5wingW)/2,((c3OD/2)-p7bearingfromfront-(p7wiggleL/2)-bearingholderZBW)/2,0]) cylinder(d=((c3OD/2)-p7bearingfromfront-(p7wiggleL/2)-bearingholderZBW),h=p5bodyH,$fn=360); } }//end body translate } //end main translate } //end mirror } //end main module module CKbolt(D,BL,HH,HSD){ cylinder(d=D,h=BL,$fn=32); fudge = 1/cos(180/(6)); translate([0,0,-HH]) rotate([0,0,360/6/2]) cylinder(h=HH,r=HSD/2*fudge,$fn=(6)); } module CKnut(BD,H,SD){ fudge = 1/cos(180/(6)); difference(){ translate([0,0,0]) rotate([0,0,360/6/2]) cylinder(h=H,r=SD/2*fudge,$fn=(6)); cylinder(d=BD,h=H,$fn=32); } }
CKp6.scad "big bearing holder"
- Depricated
- Replaced with p5
CKp7.scad "Z bearing holder"
- should a horizontal bearing be added to help keep plates aligned?
include <CKvars.scad>; rotate([0,90,0]) CKp7(0); //small bearing holder module CKp7(B){ translate([-p7baseW/2,0,0]){ difference(){ union(){ cube([p7baseW,p7baseL,p7baseH]); cube([p7baseW,p7baseL/2,p7baseH+p7mountnutH]); translate([0,(p7baseL/2)-(p7wallW/2),0]) cube([p7baseW,p7wallW,bearingholderZB2C+(p7mountH/2)]); translate([0,(p7baseL/2)-(p7wallW/2)-p7mountL,bearingholderZB2C-(p7mountH/2)]) cube([p7baseW,p7mountL,p7mountH]); //diagnal brace translate([0,((p7baseL-p7wallW)/2)+p7wallW,p7baseH]){ difference(){ cube([p7baseW,(p7baseL-p7wallW)/2,bearingholderZB2C*2/3]); translate([0,(p7baseL-p7wallW)/2,0]) rotate([1/tan(((bearingholderZB2C*2/3))/((p7baseL-p7wallW)/2)),0,0]) cube([p7baseW,bearingholderZB2C*2,bearingholderZB2C*2]); } //end brace translate } //end brace difference } //end main union //bore hole translate([(p7baseW)/2,((p7baseL/2)-(p7wallW/2)-p7mountL)-0.1,bearingholderZB2C]) rotate([270,0,0]) cylinder(d=bearingholderZBID,h=p7mountL+p7wallW+0.2,$fn=36); //bearing cutout translate([((p7baseW)/2)-((bearingholderZBOD+p7wiggleW)/2),(p7baseL/2)-(p7wallW/2)-p7mountL+p7bearingfromfront,bearingholderZB2C-(p7mountH/2)-0.1]) cube([bearingholderZBOD+p7wiggleW,bearingholderZBW+p7wiggleL,p7mountH+0.2]); ////mount holes // hole 1 translate([p7mounthole2edge,p7mounthole2edge,0]) cylinder(d=p7mountholeOD,h=p7baseH+0.1,$fn=36); // hole 2 translate([p7baseW-p7mounthole2edge,p7mounthole2edge,0]) cylinder(d=p7mountholeOD,h=p7baseH+0.1,$fn=36); // hole 3 translate([p7baseW/2,p7baseL-p7mounthole2edge,0]) cylinder(d=p7mountholeOD,h=p7baseH+0.1,$fn=36); translate([p7baseW/2,p7baseL-p7mounthole2edge,p7baseH]) cylinder(d=p7mountholeHeadOD,h=bearingholderZB2C+(p7mountH/2),$fn=36); // hole 1 hex head translate([p7mounthole2edge,p7mounthole2edge,p7baseH]) cylinder(d=p7mountnutOD,h=p7mountnutH+0.1,$fn=6); // hole 2 hex head translate([p7baseW-p7mounthole2edge,p7mounthole2edge,p7baseH]) cylinder(d=p7mountnutOD,h=p7mountnutH+0.1,$fn=6); } //end main difference //bearing if(B==1){ translate([p7baseW/2,p7bearingfromfront+(p7wiggleL/2),bearingholderZB2C]) rotate([270,0,0]) difference(){ cylinder(d=bearingholderSmallBOD,h=bearingholderSmallBW, $fn=36); cylinder(d=bearingholderSmallBID,h=bearingholderSmallBW, $fn=36); } //bolt translate([p7baseW/2,0,bearingholderZB2C]) rotate([-90,0,0]) rotate([0,0,360/6]) CKbolt(p7boltD,p7boltL,p7boltHeadH,p7boltHeadOD); //nut translate([p7baseW/2,((p7baseL-p7wallW)/2)+p7wallW,bearingholderZB2C]) rotate([-90,0,0]) rotate([0,0,360/6]) CKnut(p7boltD,p7nutH,p7boltHeadOD); } //end if } //end main translate } //end main module module CKbolt(D,BL,HH,HSD){ cylinder(d=D,h=BL,$fn=32); fudge = 1/cos(180/(6)); translate([0,0,-HH]) rotate([0,0,360/6/2]) cylinder(h=HH,r=HSD/2*fudge,$fn=(6)); } module CKnut(BD,H,SD){ fudge = 1/cos(180/(6)); difference(){ translate([0,0,0]) rotate([0,0,360/6/2]) cylinder(h=H,r=SD/2*fudge,$fn=(6)); cylinder(d=BD,h=H,$fn=32); } }
CKp8.scad "plate connector"
include <CKvars.scad>; CKp8(); //small bearing holder module CKp8(){ translate([0,0,0]){ difference(){ // cube([p8baseW,p8baseL,pPspace2]); hull(){ translate([0,p8baseW/2,0]) cylinder(d=p8baseW,h=p8H,$fn=36); translate([0,p8baseL-(p8baseW/2),0]) cylinder(d=p8baseW,h=p8H,$fn=36); } translate([0,p8holeend2C,-0.1]) cylinder(d=p8holeD,h=p8H+0.2,$fn=36); translate([0,p8baseL-p8holeend2C,-0.1]) cylinder(d=p8holeD,h=p8H+0.2,$fn=36); } //end main difference } //end translate } //end main module
CKp9.scad "outer connector"
include <CKvars.scad>; CKp9(); //small bearing holder module CKp9(){ rez=p2number*p2needles*2; $fn=rez; translate([-p3wallOD/2,0,0]){ difference(){ cylinder(h=p9H,d=p3wallOD+p9thickness); cylinder(h=p9H,d=p3wallOD); //first and last holes rotate([0,0,-(360/p2number/p2needles)*2]){ translate([(p3wallOD/2)-0.1,0,p9H/2]) rotate([0,90,0]){ #cylinder(h=p9thickness+0.2, d=p2holeD, $fn=18); } } rotate([0,0,((360/p2number/p2needles)*2)]){ translate([(p3wallOD/2)-0.1,0,p9H/2]) rotate([0,90,0]){ cylinder(h=p9thickness+0.2, d=p2holeD, $fn=18); } } //end first and last holes //outer holes rotate([0,0,(-360/p2number/p2needles)]){ translate([(p3wallOD/2)-0.1,0,p9H/2]) rotate([0,90,0]){ cylinder(h=p9thickness+0.2, d=p2holeD, $fn=18); } } rotate([0,0,(360/p2number/p2needles)]){ translate([(p3wallOD/2)-0.1,0,p9H/2]) rotate([0,90,0]){ cylinder(h=p9thickness+0.2, d=p2holeD, $fn=18); } } //end outer holes // cut off ends rotate([0,0,-((-360/p2number/p2needles)+(1.4*-360/p2number/p2needles))]){ cube([(p3wallOD+p9thickness)*2,(p3wallOD+p9thickness)*2,(p3wallOD+p9thickness)*2]); } rotate([0,0,((-360/p2number/p2needles)+(1.4*-360/p2number/p2needles))]){ translate([0,-((p3wallOD+p9thickness)*2),0]) cube([(p3wallOD+p9thickness)*2,(p3wallOD+p9thickness)*2,(p3wallOD+p9thickness)*2]); } translate([-((p3wallOD+p9thickness)*2),-((p3wallOD+p9thickness)*2)/2,0]) #cube([(p3wallOD+p9thickness)*2,(p3wallOD+p9thickness)*2,(p3wallOD+p9thickness)*2]); } //end main difference } //end translate } //end main module
CKpM.scad "mountain"
- takes a long time to render, have to be patient, possibly a few hours
- need to set a minimum thickness of the mountain based on distance between bolt holes
- add center inlay groove for middle plate to sit in. hold mountain in place.
- possibly move/change mounting wings from above c2 to sandwich between c2 and c3 with same height as p8
- would this cause collission with p3 base bolts and pM mount bolts?
include <CKvars.scad>; use <mb10.scad>; use <CKpM2--mountainfeeder.scad>; use <CKpM3--anglebracket.scad>; //TO DO// //*add integrated yarn feeder based on needle height //*function func6 not right? working with 45 angle but not others //*pMd4 not placing groove properly when not at 45 degrees /////// //values CKpM(X,X,X) defined as follows: //render needle path groove 1 == yes, 0 == no //render thread feeder stand using 0=none 1=angle iron 2=makerbeamm //render beam angle of the feed holder yes == 1, no == 0 rotate([-90,0,0]) CKpM(1,0,0); module CKpM(G,TF,RenderBeam){ translate([0,-p3wallOD/2,0]){ //main translate union(){ difference(){ translate([0,0,pMH/2]) //main cube translate([0,(c2ID+(pMgroove*2)+(pMwallT*2))/4,0]) cube([c2ID+(pMgroove*2)+(pMwallT*2),(c2ID+(pMgroove*2)+(pMwallT*2))/2,pMH], center=true); //main ID cut cylinder(d=pMID,h=pMH+1,$fn=rez); ////// //angled cut ends rotate([0,0,atan((((((c2ID+(pMgroove*2)+(pMwallT*2))/2)*cos(90-(pMd1e-pMd0)))+(pMshelfX/2)))/((cos(pMd1e-pMd0)*((pMID/2)+(pMshelfBoltD)+pMgroove))))]) ///////////// translate([-((pMshelfX)/2),0,0]) mirror([1,0,0]) cube([pMID*4,pMID*4,pMH]); mirror([1,0,0]) rotate([0,0,atan((((((c2ID+(pMgroove*2)+(pMwallT*2))/2)*cos(90-(pMd1e-pMd0)))+(pMshelfX/2)))/((cos(pMd1e-pMd0)*((pMID/2)+(pMshelfBoltD)+pMgroove))))]) translate([-((pMshelfX)/2),0,0]) mirror([1,0,0]) cube([pMID*4,pMID*4,pMH]); // ////// ////// //ends' angled cut with shelf //rotate([0,0,(pMd1e-pMd0)]) //mirror([1,0,0]) // cube([pMID*4,pMID*4,pPspace2+pPplate2]); //mirror([1,0,0]) //rotate([0,0,(pMd1e-pMd0)]) //mirror([1,0,0]) // cube([pMID*4,pMID*4,pPspace2+pPplate2]); // ////// ////// //shelf cuts translate([((c2ID+(pMgroove*2)+(pMwallT*2))/2)*cos(90-(pMd1e-pMd0)),0,pPspace2]) cube([pMID*4,pMID*4,pMH]); //c3 above shelf mirror([1,0,0]) translate([((c2ID+(pMgroove*2)+(pMwallT*2))/2)*cos(90-(pMd1e-pMd0)),0,pPspace2]) cube([pMID*4,pMID*4,pMH]); //c3 above shelf translate([(((c2ID+(pMgroove*2)+(pMwallT*2))/2)*cos(90-(pMd1e-pMd0)))+pMshelfX,0,0]) cube([pMID*4,pMID*4,pMH]); //of shelf mirror([1,0,0]) translate([(((c2ID+(pMgroove*2)+(pMwallT*2))/2)*cos(90-(pMd1e-pMd0)))+pMshelfX,0,0]) cube([pMID*4,pMID*4,pMH]); //of shelf //chamfered cut mirror([1,0,0]) translate([(((c2ID+(pMgroove*2)+(pMwallT*2))/2)*cos(90-(pMd1e-pMd0)))-pMshelfchamfR,0,pPspace2+pPplate2]) minkowski(){ translate([pMshelfchamfR,0,pMshelfchamfR]) cube([pMID*4,pMID*4,pMH]); sphere(r=pMshelfchamfR,$fn=100); } //end minkowski //chamfered cut mirror([0,0,0]) translate([(((c2ID+(pMgroove*2)+(pMwallT*2))/2)*cos(90-(pMd1e-pMd0)))-pMshelfchamfR,0,pPspace2+pPplate2]) minkowski(){ translate([pMshelfchamfR,0,pMshelfchamfR]) cube([pMID*4,pMID*4,pMH]); sphere(r=pMshelfchamfR,$fn=100); } //end minkowski translate([-(cos(45)*((pMshelfX)/2)),sin(45)*((pMshelfX)/2),0]) translate([0,(cos(pMd1e-pMd0)*((pMID/2)+(pMshelfBoltD)+pMgroove)),0]) translate([-((((c2ID+(pMgroove*2)+(pMwallT*2))/2)*cos(90-(pMd1e-pMd0)))+(pMshelfX/2)),0,0]) translate([0,(((((c2ID+(pMgroove*2)+(pMwallT*2))/2)/cos(pMd1e-pMd0))-((pMID/2)+(pMshelfBoltD)+pMgroove))/1.5),0]) rotate([0,0,-45]) translate([-pMID/2,0,0]) cube([pMID,pMID,pMH],center=true); mirror([1,0,0]) translate([-(cos(45)*((pMshelfX)/2)),sin(45)*((pMshelfX)/2),0]) translate([0,(cos(pMd1e-pMd0)*((pMID/2)+(pMshelfBoltD)+pMgroove)),0]) translate([-((((c2ID+(pMgroove*2)+(pMwallT*2))/2)*cos(90-(pMd1e-pMd0)))+(pMshelfX/2)),0,0]) translate([0,(((((c2ID+(pMgroove*2)+(pMwallT*2))/2)/cos(pMd1e-pMd0))-((pMID/2)+(pMshelfBoltD)+pMgroove))/1.5),0]) rotate([0,0,-45]) translate([-pMID/2,0,0]) cube([pMID,pMID,pMH],center=true); //shelf cuts /////// ////// //mounting bolt holes //1 translate([0,(cos(pMd1e-pMd0)*((pMID/2)+(pMshelfBoltD)+pMgroove)),0]) translate([-((((c2ID+(pMgroove*2)+(pMwallT*2))/2)*cos(90-(pMd1e-pMd0)))+(pMshelfX/2)),0,0]) cylinder(d=pMshelfBoltD, h=pMH, $fn=36); //2 translate([0,(cos(pMd1e-pMd0)*((pMID/2)+(pMshelfBoltD)+pMgroove)),0]) translate([-((((c2ID+(pMgroove*2)+(pMwallT*2))/2)*cos(90-(pMd1e-pMd0)))+(pMshelfX/2)),0,0]) translate([0,(((((c2ID+(pMgroove*2)+(pMwallT*2))/2)/cos(pMd1e-pMd0))-((pMID/2)+(pMshelfBoltD)+pMgroove))/1.5),0]) cylinder(d=pMshelfBoltD, h=pMH, $fn=36); mirror([1,0,0]){ //1 translate([0,(cos(pMd1e-pMd0)*((pMID/2)+(pMshelfBoltD)+pMgroove)),0]) translate([-((((c2ID+(pMgroove*2)+(pMwallT*2))/2)*cos(90-(pMd1e-pMd0)))+(pMshelfX/2)),0,0]) cylinder(d=pMshelfBoltD, h=pMH, $fn=36); //2 translate([0,(cos(pMd1e-pMd0)*((pMID/2)+(pMshelfBoltD)+pMgroove)),0]) translate([-((((c2ID+(pMgroove*2)+(pMwallT*2))/2)*cos(90-(pMd1e-pMd0)))+(pMshelfX/2)),0,0]) translate([0,(((((c2ID+(pMgroove*2)+(pMwallT*2))/2)/cos(pMd1e-pMd0))-((pMID/2)+(pMshelfBoltD)+pMgroove))/1.5),0]) cylinder(d=pMshelfBoltD, h=pMH, $fn=36); } //end mirror //end of bolt holes ////////////// ///////////////////GROOVE PATH///////// if(G==1){ //left needle path cut needlepathLEFT(); //right needle path cut mirror([1,0,0]) needlepathLEFT(); } //////// //space for smallbearingholder bolt heads translate([0,((p3baseOD/2)+1),0]){ //close enough? //smallbearingholder holes translate([-(p5wingW+p5bodyW+p5wingW)/2,0,0]){ translate([p5wingW+p5bodyW,0,0]){ //wing right holes translate([p5wingW/2,p5mounthole2back,0]) cylinder(d=p5boltHeadOD,h=p5boltHeadH+0.1,$fn=36); translate([p5wingW/2,p5wingL-p5mounthole2front,0]) cylinder(d=p5boltHeadOD,h=p5boltHeadH+0.1,$fn=36); } //end wing right translate //wing left holes translate([p5wingW/2,p5mounthole2back,0]) cylinder(d=p5boltHeadOD,h=p5boltHeadH+0.1,$fn=36); translate([p5wingW/2,p5wingL-p5mounthole2front,0]) cylinder(d=p5boltHeadOD,h=p5boltHeadH+0.1,$fn=36); }//end translate - center X of holes }//end translate to ring //end bearing bolts //////// //////// //hole for optional angle iron thread feeder mount if(TF==1){ translate([(((c2ID+(pMgroove*2)+(pMwallT*2))/2)*cos(90-(pMd1e-pMd0)))-pMshelfchamfR,((c2ID+(pMgroove*2)+(pMwallT*2))/2),pPspace2+pPplate2+pMshelfchamfR+(pMH/2)]) rotate([0,0,45]) cube([2,2,pMH],center=true); mirror([1,0,0]) translate([(((c2ID+(pMgroove*2)+(pMwallT*2))/2)*cos(90-(pMd1e-pMd0)))-pMshelfchamfR,((c2ID+(pMgroove*2)+(pMwallT*2))/2),pPspace2+pPplate2+pMshelfchamfR+(pMH/2)]) rotate([0,0,45]) cube([2,2,pMH],center=true); //translate([sin(pMd4s)*(pMID/2),(pMID/2),pPspace2+pPplate2+(aaX)]) translate([(((c2ID+(pMgroove*2)+(pMwallT*2))/2)*cos(90-(pMd1e-pMd0)))-pMshelfchamfR-(aaX-aaT)-(aaboltD/2)-1,(c2ID+(pMgroove*2)+(pMwallT*2))/2,(pPspace2+pPplate2+1)+(aaboltHD/2)+bearingholderZBOD]) rotate([90,0,0]) cylinder(d=aaboltD,h=(c2ID+(pMgroove*2)+(pMwallT*2))/2,$fn=36); translate([(((c2ID+(pMgroove*2)+(pMwallT*2))/2)*cos(90-(pMd1e-pMd0)))-pMshelfchamfR-(aaX-aaT)-(aaboltD/2)-1,((c2ID+(pMgroove*2)+(pMwallT*2))/2)-((((pMID/2)-(cos(pMd4s)*(pMID/2)))+pMwallT+pMgroove)-(sin(pMd4s)*(aaboltHD))-2-aaboltHH),(pPspace2+pPplate2+1)+(aaboltHD/2)+bearingholderZBOD]) rotate([90,0,0]) #cylinder(d=aaboltHD+0.5,h=(c2ID+(pMgroove*2)+(pMwallT*2))/2,$fn=36); mirror([1,0,0]){ translate([(((c2ID+(pMgroove*2)+(pMwallT*2))/2)*cos(90-(pMd1e-pMd0)))-pMshelfchamfR-(aaX-aaT)-(aaboltD/2)-1,(c2ID+(pMgroove*2)+(pMwallT*2))/2,(pPspace2+pPplate2+1)+(aaboltHD/2)+bearingholderZBOD]) rotate([90,0,0]) cylinder(d=aaboltD,h=(c2ID+(pMgroove*2)+(pMwallT*2))/2,$fn=36); translate([(((c2ID+(pMgroove*2)+(pMwallT*2))/2)*cos(90-(pMd1e-pMd0)))-pMshelfchamfR-(aaX-aaT)-(aaboltD/2)-1,((c2ID+(pMgroove*2)+(pMwallT*2))/2)-((((pMID/2)-(cos(pMd4s)*(pMID/2)))+pMwallT+pMgroove)-(sin(pMd4s)*(aaboltHD))-2-aaboltHH),(pPspace2+pPplate2+1)+(aaboltHD/2)+bearingholderZBOD]) rotate([90,0,0]) cylinder(d=aaboltHD+0.5,h=(c2ID+(pMgroove*2)+(pMwallT*2))/2,$fn=36); } //end mirror translate([(((c2ID+(pMgroove*2)+(pMwallT*2))/2)*cos(90-(pMd1e-pMd0)))-pMshelfchamfR-(aaX-aaT)-(aaboltD/2)-1,(c2ID+(pMgroove*2)+(pMwallT*2))/2,pMH-(aaboltHD/2)-5]) rotate([90,0,0]) cylinder(d=aaboltD,h=(c2ID+(pMgroove*2)+(pMwallT*2))/2,$fn=36); translate([(((c2ID+(pMgroove*2)+(pMwallT*2))/2)*cos(90-(pMd1e-pMd0)))-pMshelfchamfR-(aaX-aaT)-(aaboltD/2)-1,((c2ID+(pMgroove*2)+(pMwallT*2))/2)-((((pMID/2)-(cos(pMd4s)*(pMID/2)))+pMwallT+pMgroove)-(sin(pMd4s)*(aaboltHD))-2-aaboltHH),pMH-(aaboltHD/2)-5]) rotate([90,0,0]) cylinder(d=aaboltHD+0.5,h=(c2ID+(pMgroove*2)+(pMwallT*2))/2,$fn=36); mirror([1,0,0]){ translate([(((c2ID+(pMgroove*2)+(pMwallT*2))/2)*cos(90-(pMd1e-pMd0)))-pMshelfchamfR-(aaX-aaT)-(aaboltD/2)-1,(c2ID+(pMgroove*2)+(pMwallT*2))/2,pMH-(aaboltHD/2)-5]) //X=sin(pMd4s)*(pMID/2) rotate([90,0,0]) cylinder(d=aaboltD,h=(c2ID+(pMgroove*2)+(pMwallT*2))/2,$fn=36); translate([(((c2ID+(pMgroove*2)+(pMwallT*2))/2)*cos(90-(pMd1e-pMd0)))-pMshelfchamfR-(aaX-aaT)-(aaboltD/2)-1,((c2ID+(pMgroove*2)+(pMwallT*2))/2)-((((pMID/2)-(cos(pMd4s)*(pMID/2)))+pMwallT+pMgroove)-(sin(pMd4s)*(aaboltHD))-2-aaboltHH),pMH-(aaboltHD/2)-5]) rotate([90,0,0]) cylinder(d=aaboltHD+0.5,h=(c2ID+(pMgroove*2)+(pMwallT*2))/2,$fn=36); } } //end if } //end main body diffference ///////////////////////////// //////extra piece to square up shape translate([0,0,pPspace2]){ difference(){ translate([0,(c2ID+(pMgroove*2)+(pMwallT*2))/4,((pPplate2+pMextman)/2)]) cube([c2ID+(pMgroove*2)+(pMwallT*2),(c2ID+(pMgroove*2)+(pMwallT*2))/2,pPplate2+pMextman], center=true); cylinder(d=pMID,h=pMH,$fn=rez); //90 degree cut translate([((c2ID+(pMgroove*2)+(pMwallT*2))/2)*cos(90-(pMd1e-pMd0)),0,0]) cube([pMID*4,pMID*4,pPplate2+pMextman]); //below shelf mirror([1,0,0]) translate([((c2ID+(pMgroove*2)+(pMwallT*2))/2)*cos(90-(pMd1e-pMd0)),0,0]) cube([pMID*4,pMID*4,pPplate2+pMextman]); //below shelf //cut to end of groove difference(){ rotate([0,0,(pMd1e-pMd0)-pMextman]) mirror([0,0,0]) cube([pMID*4,pMID*4,pPplate2+pMextman]); cube([pMID*4,pMID*4,pPplate2+pMextman]); } difference(){ mirror([1,0,0]) rotate([0,0,(pMd1e-pMd0)-pMextman]) mirror([0,0,0]) cube([pMID*4,pMID*4,pPplate2+pMextman]); mirror([1,0,0]) cube([pMID*4,pMID*4,pPplate2+pMextman]); } }//end diff } //end translate ////////end extra piece //Thread Feeder Stand if(TF==1){ //angle iron, corner option translate([(((c2ID+(pMgroove*2)+(pMwallT*2))/2)*cos(90-(pMd1e-pMd0)))-pMshelfchamfR,((c2ID+(pMgroove*2)+(pMwallT*2))/2)-(aaX-aaT),pPspace2+pPplate2]) cube([aaT,aaX-aaT,pMshelfchamfR]); mirror([1,0,0]) translate([(((c2ID+(pMgroove*2)+(pMwallT*2))/2)*cos(90-(pMd1e-pMd0)))-pMshelfchamfR,((c2ID+(pMgroove*2)+(pMwallT*2))/2)-(aaX-aaT),pPspace2+pPplate2]) cube([aaT,aaX-aaT,pMshelfchamfR]); CubeChmfD=6; translate([(((c2ID+(pMgroove*2)+(pMwallT*2))/2)*cos(90-(pMd1e-pMd0)))-pMshelfchamfR-(aaX-aaT),((c2ID+(pMgroove*2)+(pMwallT*2))/2)-(aaX-aaT),pMH]) difference(){ translate([0,-(CubeChmfD/2),0]) cube([aaX-aaT,aaX-aaT+(CubeChmfD/2),aaX+1]); hull(){ translate([0,-(CubeChmfD/2),aaX+1]) rotate([0,90,0]) cylinder(d=CubeChmfD,h=aaX,$fn=36); translate([0,-(CubeChmfD/2),(CubeChmfD/2)*1.5]) rotate([0,90,0]) resize([CubeChmfD*1.5,CubeChmfD]) cylinder(d=CubeChmfD,h=aaX,$fn=36); } //end hull translate([aaX-aaT,aaX-aaT,(aaX+1)/2]) rotate([0,0,45]) cube([2,2,aaX+1],center=true); translate([0,0,(aaX+1)]) rotate([0,45,45]) cube([2,3,3],center=true); } mirror([1,0,0]) translate([(((c2ID+(pMgroove*2)+(pMwallT*2))/2)*cos(90-(pMd1e-pMd0)))-pMshelfchamfR-(aaX-aaT),((c2ID+(pMgroove*2)+(pMwallT*2))/2)-(aaX-aaT),pMH]) difference(){ translate([0,-(CubeChmfD/2),0]) cube([aaX-aaT,aaX-aaT+(CubeChmfD/2),aaX+1]); hull(){ translate([0,-(CubeChmfD/2),aaX+1]) rotate([0,90,0]) cylinder(d=CubeChmfD,h=aaX,$fn=36); translate([0,-(CubeChmfD/2),(CubeChmfD/2)*1.5]) rotate([0,90,0]) resize([CubeChmfD*1.5,CubeChmfD]) cylinder(d=CubeChmfD,h=aaX,$fn=36); } //end hull translate([aaX-aaT,aaX-aaT,(aaX+1)/2]) rotate([0,0,45]) cube([2,2,aaX+1],center=true); translate([0,0,(aaX+1)]) rotate([0,45,45]) cube([2,3,3],center=true); } if(RenderBeam==1){ translate([(((c2ID+(pMgroove*2)+(pMwallT*2))/2)*cos(90-(pMd1e-pMd0)))-pMshelfchamfR-(aaX-aaT),((c2ID+(pMgroove*2)+(pMwallT*2))/2)-(aaX-aaT),pPspace2+pPplate2+pMshelfchamfR]) difference(){ cube([aaX,aaX,pMgrooveC3+nA-nC-nB+aaX]); //cube cube([aaX-aaT,aaX-aaT,pMgrooveC3+nA-nC-nB+aaX]); // cube([aaX,aaX-aaT,pMH-(pPspace2+pPplate2)]); //manually cut piece // translate([aaX-aaT,aaX-aaT,0]) // cube([aaT,aaT,pMH-(pPspace2+pPplate2)]); //manually cut piece // translate([aaX-aaT,aaX/2,pMH-(pPspace2+pPplate2)+(aaX/2)]) // rotate([0,90,0]) // cylinder(d=3,h=aaT,$fn=36); // translate([aaX/2,aaX,(aaboltHD/2)+bearingholderZBOD]) // rotate([90,0,0]) // cylinder(d=3,h=aaT,$fn=36); //pPspace2+pPplate2+(aaX)]) //rotate([90,0,0]) } //end angle iron mirror(1,0,0) translate([(((c2ID+(pMgroove*2)+(pMwallT*2))/2)*cos(90-(pMd1e-pMd0)))-pMshelfchamfR-(aaX-aaT),((c2ID+(pMgroove*2)+(pMwallT*2))/2)-(aaX-aaT),pPspace2+pPplate2+pMshelfchamfR]) difference(){ cube([aaX,aaX,pMgrooveC3+nA-nC-nB+aaX]); //cube cube([aaX-aaT,aaX-aaT,pMgrooveC3+nA-nC-nB+aaX]); } //end angle iron translate([ 0, p3wallOD/2, -nB+(pPspace1+pPplate1+pMgrooveC3-nC-(pMgrooveD-nC))+nA-((tipOpenZ-tipHole)/2)-tipcylD-nG ]) mirror([0,0,1]) translate([0,0,tipOpenX/2]) CKpM2(); translate([(((c2ID+(pMgroove*2)+(pMwallT*2))/2)*cos(90-(pMd1e-pMd0)))-pMshelfchamfR,((c2ID+(pMgroove*2)+(pMwallT*2))/2),pPspace2+pPplate2+pMshelfchamfR]) CKpM3(); mirror([1,0,0]) translate([(((c2ID+(pMgroove*2)+(pMwallT*2))/2)*cos(90-(pMd1e-pMd0)))-pMshelfchamfR,((c2ID+(pMgroove*2)+(pMwallT*2))/2),pPspace2+pPplate2+pMshelfchamfR]) CKpM3(); } //end if render beam } //end if thread feeder style angle iron if(TF==2){ //MakerBeam Option translate([(TFW/2)-(10/2),((c2ID+(pMgroove*2)+(pMwallT*2))/2)+(10/2),0]) MB10(100); translate([-(TFW/2)+(10/2),((c2ID+(pMgroove*2)+(pMwallT*2))/2)+(10/2),0]) MB10(100); } //end if thread feeder style maker beam } //end main union } //end main translate } //end CKpM module module needlepathLEFT(){ /////START GROOVE CUTS///// //7 for(i=[pMd7s:gdeg:pMd7e]){ translate([0,0,pMh7s]) rotate([270,0,i]) cylinder($fn=pMcutcylRez,d=pMgrooveD,h=pMgrooveOR); }//end 7 for //6 for(i=[pMd6s:gdeg:pMd6e]){ translate([0,0,pMh7s+func6(i)]) rotate([270,0,i]) cylinder($fn=pMcutcylRez,d=pMgrooveD,h=pMgrooveOR); }//end 6 for //5 for(i=[pMd5s:gdeg:pMd5e]){ translate([0,0,pMh7s+func6(pMd6e)-(tan(pMcutA)*(i-pMd5s)*glnd)]) /////needs work rotate([270,0,i]) cylinder($fn=pMcutcylRez,d=pMgrooveD,h=pMgrooveOR); }//end 5 for //4 for(i=[pMd4s:gdeg:pMd4e]){ hull(){ translate([0,0,func4(i)+pMh4e]) rotate([270,0,i]) cylinder($fn=pMcutcylRez,d=pMgrooveD,h=pMgrooveOR); if(i<=pMd5e){ translate([0,0,pMh7s+func6(pMd6e)-(tan(pMcutA)*(i-pMd5s)*glnd)]) rotate([270,0,i]) cylinder($fn=pMcutcylRez,d=pMgrooveD,h=pMgrooveOR); } else{ translate([0,0,0]) rotate([270,0,i]) cylinder($fn=pMcutcylRez,d=pMgrooveD,h=pMgrooveOR); } } //end hull }//end 4 for //3 for(i=[pMd3s:gdeg:pMd3e]){ hull(){ translate([0,0,pMh4e]) rotate([270,0,i]) cylinder($fn=pMcutcylRez,d=pMgrooveD,h=pMgrooveOR); if(i<=pMd5e){ translate([0,0,pMh7s+func6(pMd6e)-(tan(pMcutA)*(i-pMd5s)*glnd)]) rotate([270,0,i]) cylinder($fn=pMcutcylRez,d=pMgrooveD,h=pMgrooveOR); } else{ translate([0,0,0]) rotate([270,0,i]) cylinder($fn=pMcutcylRez,d=pMgrooveD,h=pMgrooveOR); } } //end hull }//end 3 for //2 for(i=[pMd2s:gdeg:pMd2e]){ hull(){ translate([0,0,func2(i)+pMh2s]) rotate([270,0,i]) cylinder($fn=pMcutcylRez,d=pMgrooveD,h=pMgrooveOR); if(i<=pMd5e){ translate([0,0,pMh7s+func6(pMd6e)-(tan(pMcutA)*(i-pMd5s)*glnd)]) rotate([270,0,i]) cylinder($fn=pMcutcylRez,d=pMgrooveD,h=pMgrooveOR); } //end if else{ translate([0,0,0]) rotate([270,0,i]) cylinder($fn=pMcutcylRez,d=pMgrooveD,h=pMgrooveOR); } //end else } //end hull }//end 2 for multrez=10; //1 for(i=[pMd1s:gdeg/multrez:pMd1e-(gdeg/2)]){ hull(){ translate([0,0,pMh2s+func2(pMd2e)+(tan(pMcutA)*(i-pMd1s)*glnd)]) /////needs work rotate([270,0,i]) union(){ #cylinder($fn=36*2,d=pMgrooveD,h=pMgrooveOR); translate([-pMgrooveD/2,-pMgrooveD/2,0]) #cube([pMgrooveD/2,pMgrooveD,pMgrooveOR]); } if(i<=pMd5e){ translate([0,0,pMh7s+func6(pMd6e)-(tan(pMcutA)*(i-pMd5s)*glnd)]) rotate([270,0,i]) cylinder($fn=pMcutcylRez,d=pMgrooveD,h=pMgrooveOR); } //end if else{ translate([0,0,0]) rotate([270,0,i]) cylinder($fn=pMcutcylRez,d=pMgrooveD,h=pMgrooveOR); } //end else }//end hull }//end 1 for /* //0 for(i=[pMd0s:gdeg:pMd0e]){ hull(){ translate([0,0,pMh0s-func0(i)]) rotate([270,0,i]) #cylinder($fn=pMcutcylRez,d=pMgrooveD,h=pMgrooveOR); if(i<=pMd5e){ translate([0,0,pMh7s+func6(pMd6e)-(tan(pMcutA)*(i-pMd5s)*glnd)]) rotate([270,0,i]) cylinder($fn=pMcutcylRez,d=pMgrooveD,h=pMgrooveOR); } //end if else{ translate([0,0,0]) rotate([270,0,i]) cylinder($fn=pMcutcylRez,d=pMgrooveD,h=pMgrooveOR); } //end else } //end hull }//end 2 for */ //shelf for(i=[pMdSs:gdeg/multrez:pMd1e+pMshelfd]){ rotate([0,0,i]) translate([0,pMgrooveOR/2,0]) #cube([pMgrooveD,pMgrooveOR,pPspace2*2],center=true); }//end 0 for } //end left needle groove module
CKpM2.scad "thread feeder"
- directs thread to the needles at the top of the mounatin groove path
include <CKvars.scad>; use <CKneedle.scad>; use <CKpM--mountain.scad>; use <mb10.scad>; translate([0,0,-pM2mink/8/2]) CKpM2(); /* translate([0,-p3wallOD/2,0]) //main translate translate([0,0,-nA]) translate([0,0,-nB+(pPspace1+pPplate1+pMgrooveC3-nC-(pMgrooveD-nC))]) rotate([0,0,-90]) translate([(-p3wallID/2)+(p2needlegrooveDepthslop/2),0,0]) translate([0,nX/2,0]) rotate([90,0,0]) needle(); */ wXtrans=(((c2ID+(pMgroove*2)+(pMwallT*2))/2)*cos(90-(pMd1e-pMd0)))-pMshelfchamfR-(aaX-aaT); //(sin(pMd4s)*(pMID/2))-(aaX/2) module CKpM2(){ difference(){ union(){ translate([0,-p3wallOD/2,0]){ //main translate translate([wXtrans,((c2ID+(pMgroove*2)+(pMwallT*2))/2)-(aaX-aaT),0]) difference(){ minkowski(){ union(){ difference(){ cube([aaX,aaX,pM2H]); //cube cube([aaX-aaT,aaX-aaT,pM2H]); } //end angle iron translate([0,aaX,0]) #cube([aaX,aasqNutH+3,pM2H]); } //end union sphere(d=pM2mink, $fn=10); //,h=0.01 $fn=72 } //end minkowski }//end difference mirror([1,0,0]) translate([wXtrans,((c2ID+(pMgroove*2)+(pMwallT*2))/2)-(aaX-aaT),0]) difference(){ minkowski(){ union(){ difference(){ cube([aaX,aaX,pM2H]); //cube cube([aaX-aaT,aaX-aaT,pM2H]); } //end angle iron translate([0,aaX,0]) #cube([aaX,aasqNutH+3,pM2H]); } //end union sphere(d=pM2mink, $fn=10); //,h=0.01 $fn=72 } //end minkowski }//end difference minkowski(){ difference(){ //main wall between supports translate([-M2inX/2,((c2ID+(pMgroove*2)+(pMwallT*2))/2)+aaT,pM2mink/2]) mirror([0,1,0]) cube([M2inX,M2inY,M2inZ]); //right side cylinder cut translate([M2inX/2,M2backwallOD-M2inY,0]) resize([M2inX-(tipOpenX),(M2inY-aaT)*2]) cylinder(d=200,h=pM2H,$fn=72); //left side cylinder cut mirror([1,0,0]) translate([M2inX/2,M2backwallOD-M2inY,0]) resize([M2inX-(tipOpenX),(M2inY-aaT)*2]) cylinder(d=200,h=pM2H,$fn=72); //main cylinder cut translate([0,M2backwallOD,M2inZ]) rotate([90,0,0]) resize([M2inX,(M2inZ-tipOpenZ+(pM2mink/2))*2]) cylinder(d=200,h=M2inY,$fn=72); //thread entrance cut translate([0,M2backwallOD-M2inY,0]) hull(){ cylinder(d=tipOpenX,h=pM2H); translate([0,((((((c2ID+(pMgroove*2)+(pMwallT*2))/2))-(p2OD/2)+(tipOpenX/2))*2)/2)/4,0]) cylinder(d=tipOpenX,h=pM2H,$fn=72); } }//end diff sphere(d=pM2mink,$fn=10); } //end mink //tip try 2 translate([0,M2backwallOD-M2inY,0]){ //(p2OD/2)+(tipOpenX/2) hull(){ //right back translate([tipOpenX/2,0,(tipcylD*1.5/2)]) cylinder(d=tipcylD*1.5, h=tipOpenZ-(tipcylD*1.5), $fn=36); //right front translate([(tipcylD/2)+(tipHole/2),-(tipOpenX/2)+1,(tipOpenX/2)-(nE/2)]) //? cylinder(d=tipcylD,h=(tipcylD/2)+tipHole+(tipcylD/2),$fn=36); } mirror([1,0,0]) hull(){ //left back translate([tipOpenX/2,0,(tipcylD*1.5/2)]) cylinder(d=tipcylD*1.5, h=tipOpenZ-(tipcylD*1.5), $fn=36); //left front translate([(tipcylD/2)+(tipHole/2),-(tipOpenX/2)+1,(tipOpenX/2)-(nE/2)]) cylinder(d=tipcylD,h=(tipcylD/2)+tipHole+(tipcylD/2),$fn=36); } hull(){ //bottom front translate([-(tipcylD+tipHole+tipcylD)/2,-(tipOpenX/2)+(tipcylD/2),((tipOpenZ-tipHole)/2)-(tipcylD/2)]) rotate([0,90,0]) cylinder(d=tipcylD,h=tipcylD+tipHole+tipcylD,$fn=36); //center sphere bottom back translate([cos(90)*((tipOpenX/2)-((pM2mink-tipcylD)/2)),(tipOpenX/2)-(sin(90)*(tipOpenX/2)*0.5),tipcy2D/2]) translate([0,-tipOpenX/2,0]) translate([1/4,0,0]) sphere(d=tipcy2D,$fn=8); //center sphere bottom back mirror([1,0,0]) translate([cos(90)*((tipOpenX/2)-((pM2mink-tipcylD)/2)),(tipOpenX/2)-(sin(90)*(tipOpenX/2)*0.5),tipcy2D/2]) translate([0,-tipOpenX/2,0]) translate([1/4,0,0]) sphere(d=tipcy2D,$fn=8); } //end full for(i=[0:90]){ hull(){ //bottom back translate([cos(i)*((tipOpenX/2)-((pM2mink-tipcylD)/2)),(tipOpenX/2)-(sin(i)*(tipOpenX/2)*0.5),tipcy2D/2]) translate([0,-tipOpenX/2,0]) translate([1/4,0,0]) sphere(d=tipcy2D,$fn=8); //bottom front translate([((tipcylD+tipHole+tipcylD)/2)-0.1,-(tipOpenX/2)+(tipcylD/2),((tipOpenZ-tipHole)/2)-(tipcylD/2)]) rotate([0,90,0]) cylinder(d=tipcylD,h=0.1,$fn=36); //change from nG to something else? } //end hull } //end for mirror([1,0,0]) for(i=[0:90]){ hull(){ //bottom back translate([cos(i)*((tipOpenX/2)-((pM2mink-tipcylD)/2)),(tipOpenX/2)-(sin(i)*(tipOpenX/2)*0.5),tipcy2D/2]) translate([0,-tipOpenX/2,0]) translate([1/4,0,0]) sphere(d=tipcy2D,$fn=8); //bottom front translate([((tipcylD+tipHole+tipcylD)/2)-0.1,-(tipOpenX/2)+(tipcylD/2),((tipOpenZ-tipHole)/2)-(tipcylD/2)]) rotate([0,90,0]) cylinder(d=tipcylD,h=0.1,$fn=36); //change from nG to something else? } //end hull } //end for hull(){ //top front translate([-(tipcylD+tipHole+tipcylD)/2,-(tipOpenX/2)+(tipcylD/2),tipOpenZ-((tipOpenZ-tipHole)/2)+(tipcylD/2)]) rotate([0,90,0]) cylinder(d=tipcylD,h=tipcylD+tipHole+tipcylD,$fn=36); //change from nG to something else? //center sphere top back translate([cos(90)*((tipOpenX/2)-((pM2mink-tipcylD)/2)),(tipOpenX/2)-(sin(90)*(tipOpenX/2)*0.5),-tipcy2D/2]) translate([0,-tipOpenX/2,tipOpenZ]) translate([1/4,0,0]) sphere(d=tipcy2D,$fn=18); //center sphere top back mirror([1,0,0]) translate([cos(90)*((tipOpenX/2)-((pM2mink-tipcylD)/2)),(tipOpenX/2)-(sin(90)*(tipOpenX/2)*0.5),-tipcy2D/2]) translate([0,-tipOpenX/2,tipOpenZ]) translate([1/4,0,0]) sphere(d=tipcy2D,$fn=18); } //end full for(i=[0:90]){ hull(){ //top back translate([cos(i)*((tipOpenX/2)-((pM2mink-tipcylD)/2)),(tipOpenX/2)-(sin(i)*(tipOpenX/2)*0.5),-tipcy2D/2]) translate([0,-tipOpenX/2,tipOpenZ]) translate([1/4,0,0]) sphere(d=tipcy2D,$fn=18); //top front translate([((tipcylD+tipHole+tipcylD)/2)-0.1,-(tipOpenX/2)+(tipcylD/2),tipOpenZ-((tipOpenZ-tipHole)/2)+(tipcylD/2)]) rotate([0,90,0]) cylinder(d=tipcylD,h=0.1,$fn=36); //change from nG to something else? } //end hull } //end for mirror([1,0,0]) for(i=[0:90]){ hull(){ //top back translate([cos(i)*((tipOpenX/2)-((pM2mink-tipcylD)/2)),(tipOpenX/2)-(sin(i)*(tipOpenX/2)*0.5),-tipcy2D/2]) translate([0,-tipOpenX/2,tipOpenZ]) translate([1/4,0,0]) sphere(d=tipcy2D,$fn=18); //top front translate([((tipcylD+tipHole+tipcylD)/2)-0.1,-(tipOpenX/2)+(tipcylD/2),tipOpenZ-((tipOpenZ-tipHole)/2)+(tipcylD/2)]) rotate([0,90,0]) cylinder(d=tipcylD,h=0.1,$fn=36); //change from nG to something else? } //end hull } //end for hull(){ translate([cos(0)*((tipOpenX/2)-((pM2mink-tipcylD)/2)),(tipOpenX/2)-(sin(0)*(tipOpenX/2)*0.5),-tipcy2D/2]) translate([0,-tipOpenX/2,tipOpenZ]) translate([1/4,0,0]) sphere(d=tipcy2D,$fn=18); translate([tipOpenX/2,((((((c2ID+(pMgroove*2)+(pMwallT*2))/2))-(p2OD/2)+(tipOpenX/2))*2)/2)/4,tipOpenZ-(pM2mink/2)]) sphere(d=pM2mink,$fn=10); } mirror([1,0,0]) hull(){ translate([cos(0)*((tipOpenX/2)-((pM2mink-tipcylD)/2)),(tipOpenX/2)-(sin(0)*(tipOpenX/2)*0.5),-tipcy2D/2]) translate([0,-tipOpenX/2,tipOpenZ]) translate([1/4,0,0]) sphere(d=tipcy2D,$fn=18); translate([tipOpenX/2,((((((c2ID+(pMgroove*2)+(pMwallT*2))/2))-(p2OD/2)+(tipOpenX/2))*2)/2)/4,tipOpenZ-(pM2mink/2)]) sphere(d=pM2mink,$fn=10); } //bottom fade to wall hull(){ translate([cos(0)*((tipOpenX/2)-((pM2mink-tipcylD)/2)),(tipOpenX/2)-(sin(0)*(tipOpenX/2)*0.5),tipcy2D/2]) translate([0,-tipOpenX/2,0]) translate([1/4,0,0]) sphere(d=tipcy2D,$fn=8); translate([tipOpenX/2,((((((c2ID+(pMgroove*2)+(pMwallT*2))/2))-(p2OD/2)+(tipOpenX/2))*2)/2)/4,(pM2mink/2)]) sphere(d=pM2mink,$fn=10); } mirror([1,0,0]) hull(){ translate([cos(0)*((tipOpenX/2)-((pM2mink-tipcylD)/2)),(tipOpenX/2)-(sin(0)*(tipOpenX/2)*0.5),tipcy2D/2]) translate([0,-tipOpenX/2,0]) translate([1/4,0,0]) sphere(d=tipcy2D,$fn=8); translate([tipOpenX/2,((((((c2ID+(pMgroove*2)+(pMwallT*2))/2))-(p2OD/2)+(tipOpenX/2))*2)/2)/4,(pM2mink/2)]) sphere(d=pM2mink,$fn=10); } } //end tip translate //end tip try 2 } //end translate } //end main union //cut slot for angle iron in sliding section translate([0,-p3wallOD/2,]){ translate([wXtrans,((c2ID+(pMgroove*2)+(pMwallT*2))/2)-(aaX-aaT),0]){ translate([-pM2mink,-pM2mink,pM2H]) # cube([aaX+(3*2),aaX+(3*2),pM2mink]); //cube translate([-(pM2slop/2),-(pM2slop/2),0]) difference(){ cube([aaX+(pM2slop),aaX+(pM2slop),pM2H]); //cube cube([aaX-aaT-(pM2slop/4),aaX-aaT-(pM2slop/4),pM2H]); } translate([(aaX/2)-((aasqNutW+NEMAsqNutSlop)/2),aaX,0]) #cube([aasqNutW+NEMAsqNutSlop,aasqNutH+NEMAsqNutSlop,aasqNutW+NEMAsqNutSlop+2]); translate([(aaX/2),aaX,2+(aasqNutW+NEMAsqNutSlop)/2]) rotate([270,0,0]) #cylinder(d=aaboltD,h=aaX,$fn=36); translate([0,0,pM2H]) mirror([0,0,1]){ translate([(aaX/2)-((aasqNutW+NEMAsqNutSlop)/2),aaX,0]) #cube([aasqNutW+NEMAsqNutSlop,aasqNutH+NEMAsqNutSlop,aasqNutW+NEMAsqNutSlop+2]); translate([(aaX/2),aaX,2+(aasqNutW+NEMAsqNutSlop)/2]) rotate([270,0,0]) #cylinder(d=aaboltD,h=aaX,$fn=36); } } //end difference mirror([1,0,0]) translate([wXtrans,((c2ID+(pMgroove*2)+(pMwallT*2))/2)-(aaX-aaT),0]){ translate([-pM2mink,-pM2mink,pM2H]) # cube([aaX+(3*2),aaX+(3*2),pM2mink]); //cube translate([-(pM2slop/2),-(pM2slop/2),0]) difference(){ cube([aaX+(pM2slop),aaX+(pM2slop),pM2H]); //cube cube([aaX-aaT-(pM2slop/4),aaX-aaT-(pM2slop/4),pM2H]); } translate([(aaX/2)-((aasqNutW+NEMAsqNutSlop)/2),aaX,0]) #cube([aasqNutW+NEMAsqNutSlop,aasqNutH+NEMAsqNutSlop,aasqNutW+NEMAsqNutSlop+2]); translate([(aaX/2),aaX,2+(aasqNutW+NEMAsqNutSlop)/2]) rotate([270,0,0]) #cylinder(d=aaboltD,h=aaX,$fn=36); translate([0,0,pM2H]) mirror([0,0,1]){ translate([(aaX/2)-((aasqNutW+NEMAsqNutSlop)/2),aaX,0]) #cube([aasqNutW+NEMAsqNutSlop,aasqNutH+NEMAsqNutSlop,aasqNutW+NEMAsqNutSlop+2]); translate([(aaX/2),aaX,2+(aasqNutW+NEMAsqNutSlop)/2]) rotate([270,0,0]) #cylinder(d=aaboltD,h=aaX,$fn=36); } } //end difference } //end cut translate translate([-M2inX*2,-M2inY*2,pM2mink/8/2]) mirror([0,0,1]) cube([M2inX*4,M2inY*4,pM2mink]); translate([-M2inX*2,-M2inY*2,pM2H]) cube([M2inX*4,M2inY*4,pM2mink]); } //end main difference } //end module
CKpM3.scad "angle bracket"
- holds angle iron into corner
- need to redo larger radius to take into account aaT
include <CKvars.scad>; CKpM3(); module CKpM3(){ mirror([0,1,0]) mirror([1,0,0]) difference(){ hull(){ pM3profile(pM3c2e+pM3c2c+pM3c2e,0.5); translate([0,0,pM3c2e+aaboltD]) pM3profile(pM3c2c-(aaboltD*2),pM3mink); } translate([-aaT/3,-aaT/3,0]) cube([(aaboltD*3)+aaX+pM3mink,aaX+pM3mink,pM3H]); //cube translate([-aaT,-aaT,0]) cube([aaX+pM3slop/2,aaX+pM3slop/2,pM3H]); //cube translate([-(-(aaX-aaT)-(aaboltD/2)-1),0,pM3c2e]) rotate([90,0,0]) cylinder(d=aaboltD,h=aaX,$fn=36); translate([-(-(aaX-aaT)-(aaboltD/2)-1),0,pM3c2e+pM3c2c]) rotate([90,0,0]) cylinder(d=aaboltD,h=aaX,$fn=36); } //end diff } //end module module pM3profile(h,c){ RM=pM3mink/2; //constant = r of minkoswki RrD=c; //distance from corner = c RrC=(RM*RM)-((RrD/2)*(RrD/2)); //distance from corner //cos(45)*aaT ?? RtX=((sqrt(2))*(sqrt((RM*RM)+(RrC*RrC)+(2*RM*RrC))))-RM-RrC; RrR=RtX+RM; difference(){ minkowski(){ difference(){ translate([-aaT,-aaT,0]) cube([(aaboltD*3)+aaX,aaX,h]); //cube cube([(aaboltD*3)+aaX-aaT,aaX-aaT,h]); } cylinder(d=pM3mink, h=0.01, $fn=36); //,h=0.01 $fn=72 } //end mink translate([-aaT/3,-aaT/3,0]) cube([(aaboltD*3)+aaX+pM3mink,aaX+pM3mink,h]); //cube translate([0,0,h-0.011]) minkowski(){ difference(){ translate([-aaT,-aaT,0]) cube([(aaboltD*3)+aaX,aaX,h]); //cube cube([(aaboltD*3)+aaX-aaT,aaX-aaT,h]); } cylinder(d=pM3mink, h=0.01, $fn=36); //,h=0.01 $fn=72 } //end mink difference(){ translate([-aaT,-aaT,0]) cube([aaX+pM3slop/2,aaX+pM3slop/2,h]); //cube } //cornercut translate([0,0,0]) intersection(){ translate([-aaT+RtX-(RtX+RM),-aaT+RtX-(RtX+RM),0]) #cube([RtX+RM,RtX+RM,h]); translate([-aaT+RtX,-aaT+RtX,0]) difference(){ cylinder(r=RrR+20, h=h, $fn=18); cylinder(r=RrR, h=h+1, $fn=36); } } //end intersection } //end diff } //end module
2D Cuts
- Parts to be cut out using a CNC machine
CKc1.scad
include <CKvars.scad>; use <CKc2--bottom_surface_motor_gears.scad>; use <CKp1--motor_gear.scad>; ////TODO //move Z mounts to corners //place a Z next to stepper, or on either side //need to reduce to 380 OD width side to side //need to reduce wasted space around the edges projection(cut = false) translate([c1W/2,0,0]) CKc1(); /* translate([(c1OD/2),0,c1H+1]) rotate([0,0,0]) translate([-(CKp1_pitch_radius+CKc2_pitch_radius),0,0]) CKp1(); */ //need to make first Z mount less than 45 if there is room //make sure to update full assembly //((p3baseOD/2)+1+((p5wingL)-(p5bearingfromwall+(p5wiggleL/2)+p5boltHeadH)))*2; //length to outside of outter bearing module CKc1(){ echo("c2c of gears",CKp1_pitch_radius+CKc2_pitch_radius); rez=p2number*p2needles*2; //calculate desired rezolution $fn=rez; //defines resolution of circles. translate([0,0,0]){ difference(){ translate([-c1W/2,-c1OD/2,0]) cube([c1W,c1OD,c1H]); /* // union(){ //octogon difference(){ translate([-c1zOD/2,-c1zOD/2,0]) cube([c1zOD,c1zOD,c1H]); //use C1OD stepper side, use new number for Z side for(i=[2:8]){ rotate([0,0,(45*i)+90]) translate([c1zOD/2,-c1zOD/2,0]) #cube([c1zOD,c1zOD,c1H]); } for(i=[1]){ rotate([0,0,(45*i)+90]) translate([c1OD/2,-c1OD/2,0]) #cube([c1OD,c1OD,c1H]); } } //end diff */ // fudge = 1/cos(180/(8)); // rotate([0,0,360/8/2]) // cylinder(h=c1H,r=(c1OD/2)*fudge,$fn=(8)); // cylinder(h=c1H,d=c1OD); // } //end main union cylinder(h=c1H+2,d=p3baseID); // donut hole //base needle holes ////should these be circles instead? easier to cut? slot with rounded ends? for(i=[1:p2needles*p2number]){ rotate([0,0,(360/p2number/p2needles/2)-(360/p2number/p2needles*i)]){ translate([-p2OD/2,-needleWidth/2,-0.01]) { cube([p2needlegrooveDepth,needleWidth,p3wallH+0.02]); translate([0,needleWidth/2,0]) cylinder(h=c1H+2,d=needleWidth,$fn=36); translate([p2needlegrooveDepth,needleWidth/2,0]) cylinder(h=c1H+2,d=needleWidth,$fn=36); } } //end rotate } //end for //base mounting holes //p3 - "outer" holes for(i=[1:p3baseholenumber*p3number]){ rotate([0,0,(((360/p3number/p3baseholenumber))/2)-((360/p3number/p3baseholenumber)*i)]){ translate([-(p3baseOD/2)+p3baseholefromODID,0,0]) cylinder(h=c1H+2,d=p3baseholeD,$fn=18); } //end rotate } //end outer hole set for //Z bearing mount holes for(i=[0:(p7number/2)-1]){ rotate([0,0,45-((90/((p7number/2)-1))*i)]){ translate([0,(c3OD/2)-p7bearingfromfront-(p7wiggleL/2)-bearingholderZBW,0]){ translate([-p7baseW/2,0,0]){ // hole 1 translate([p7mounthole2edge,p7mounthole2edge,0]) cylinder(d=p7mountholeOD,h=c1H+0.1,$fn=36); // hole 2 translate([p7baseW-p7mounthole2edge,p7mounthole2edge,0]) cylinder(d=p7mountholeOD,h=c1H+0.1,$fn=36); // hole 3 translate([p7baseW/2,p7baseL-p7mounthole2edge,0]) cylinder(d=p7mountholeOD,h=c1H+0.1,$fn=36); }//end translate }//end translate }//end rotate }//end for mirror([0,1,0]) for(i=[0:(p7number/2)-1]){ rotate([0,0,45-((90/((p7number/2)-1))*i)]){ translate([0,(c3OD/2)-p7bearingfromfront-(p7wiggleL/2)-bearingholderZBW,0]){ //close enough? translate([-p7baseW/2,0,0]){ // hole 1 translate([p7mounthole2edge,p7mounthole2edge,0]) cylinder(d=p7mountholeOD,h=c1H+0.1,$fn=36); // hole 2 translate([p7baseW-p7mounthole2edge,p7mounthole2edge,0]) cylinder(d=p7mountholeOD,h=c1H+0.1,$fn=36); // hole 3 translate([p7baseW/2,p7baseL-p7mounthole2edge,0]) cylinder(d=p7mountholeOD,h=c1H+0.1,$fn=36); }//end translate }//end translate }//end rotate }//end for //Stepper Mount for(i=[1:c1steppersnumber]){ rotate([0,0,((360/c1steppersnumber)*i)-(90)]) translate([-(CKp1_pitch_radius+CKc2_pitch_radius),0,0]){ cylinder(d=NEMAfaceCricOD+0.25,h=c1H); translate([NEMAboltDis/2,NEMAboltDis/2,0]) cylinder(d=NEMAboltOD,h=c1H); translate([-NEMAboltDis/2,NEMAboltDis/2,0]) cylinder(d=NEMAboltOD,h=c1H); translate([NEMAboltDis/2,-NEMAboltDis/2,0]) cylinder(d=NEMAboltOD,h=c1H); translate([-NEMAboltDis/2,-NEMAboltDis/2,0]) cylinder(d=NEMAboltOD,h=c1H); } } //mounting wood beams for(i=[1:4]){ translate([(((c1W+(c1W/5))/5)*i)-((c1W+(c1W/5))/2),-(c1OD/2)+(woodbeamW/2),0]) cylinder(d=woodbeamScrewOD,h=c1H); } mirror([0,1,0]) for(i=[1:4]){ translate([(((c1W+(c1W/5))/5)*i)-((c1W+(c1W/5))/2),-(c1OD/2)+(woodbeamW/2),0]) cylinder(d=woodbeamScrewOD,h=c1H); } for(i=[1:2]){ translate([(c1W/2)-(woodbeamW/2),-(((c1W+(c1W/5))/5)*i)+((c1OD+(c1W/5))/2),0]) cylinder(d=woodbeamScrewOD,h=c1H); } mirror([1,0,0]) for(i=[1:2]){ translate([(c1W/2)-(woodbeamW/2),-(((c1W+(c1W/5))/5)*i)+((c1OD+(c1W/5))/2),0]) cylinder(d=woodbeamScrewOD,h=c1H); } mirror([0,1,0]){ for(i=[1:2]){ translate([(c1W/2)-(woodbeamW/2),-(((c1W+(c1W/5))/5)*i)+((c1OD+(c1W/5))/2),0]) cylinder(d=woodbeamScrewOD,h=c1H); } mirror([1,0,0]) for(i=[1:2]){ translate([(c1W/2)-(woodbeamW/2),-(((c1W+(c1W/5))/5)*i)+((c1OD+(c1W/5))/2),0]) cylinder(d=woodbeamScrewOD,h=c1H); } } /* for(i=[1:7]){ rotate([0,0,(360/8*i)-45]){ translate([-(c1zOD/2)+(woodbeamW/2),0,0]) cylinder(d=woodbeamScrewOD,h=c1H); translate([-(c1zOD/2)+(woodbeamW/2),tan(360/8/2)*(-(c1zOD/2)+(woodbeamW/2))+(woodbeamW),0]) cylinder(d=woodbeamScrewOD,h=c1H); translate([-(c1zOD/2)+(woodbeamW/2),tan(360/8/2)*((c1zOD/2)-(woodbeamW/2))-(woodbeamW),0]) cylinder(d=woodbeamScrewOD,h=c1H); } //end rotate } //end for */ } //end main difference } //end main translate } //end CKc1 module
CKc2.scad "geared plate"
- Need to update depricated commands:
- DEPRECATED: child() will be removed in future releases. Use children() instead.
- DEPRECATED: The assign() module will be removed in future releases. Use a regular assignment instead.
Number of Teeth = Floor( ((-2*OutsideDiameter)/(PitchDiameter-OutsideDiameter)) -2 )
Circular Pitch = 180 * PitchDiameter / Number of Teether
include <CKvars.scad>; use <CKpM--mountain.scad> use <CKc3--topplate.scad> rez=p2number*p2needles*2; //calculate desired rezolution $fn=rez; //defines resolution of circles. pi=3.1415926535897932384626433832795; //c3 for review //translate([0,0,10]) //CKc3(); /* translate([0,-c3OD/2,0]) translate([0,p3wallOD/2,c2H]) CKpM(0); */ projection(cut = false) CKc2(); module CKc2(){ translate([0,-c3OD/2,0]){ rotate([0,0,-((360/c2connectors))]) difference(){ gear (circular_pitch=pCir, gear_thickness = c2H, rim_thickness = c2H, hub_thickness = c2H, circles=0); cylinder(h=c2H+2,d=c3ID); // donut hole //calculate number of holes to skip in for() using arc of mountain? //plate connector holes for(i=[2:c2connectors]){ rotate([0,0,((360/c2connectors)*i)]){ translate([0,p8innerboltO2C,-0.1]) cylinder(d=p8holeD,h=c2H+0.2,$fn=36); translate([0,p8outerboltO2C,-0.1]) cylinder(d=p8holeD,h=c2H+0.2,$fn=36); } //end rotate i } //end for //small bearing holder for(i=[1:c2bmounts]){ rotate([0,0,-((360/c2connectors)/2)+((360/c2bmounts)*i)]){ translate([0,((p3baseOD/2)+1),0]){ //smallbearingholder holes translate([-(p5wingW+p5bodyW+p5wingW)/2,0,0]){ translate([p5wingW+p5bodyW,0,0]){ //wing right holes translate([p5wingW/2,p5mounthole2back,0]) cylinder(d=p5mountholeOD,h=c2H+0.1,$fn=36); translate([p5wingW/2,p5wingL-p5mounthole2front,0]) cylinder(d=p5mountholeOD,h=c2H+0.1,$fn=36); } //end wing right translate //wing left holes translate([p5wingW/2,p5mounthole2back,0]) cylinder(d=p5mountholeOD,h=c2H+0.1,$fn=36); translate([p5wingW/2,p5wingL-p5mounthole2front,0]) cylinder(d=p5mountholeOD,h=c2H+0.1,$fn=36); }//end translate - center X of holes }//end translate to ring }//end for rotate }//end small bearing holder for //small bearing holder - under mountain rotate([0,0,((360/c2connectors))]){ translate([0,(p3baseOD/2)+1,0]){ //close enough? //smallbearingholder holes translate([-(p5wingW+p5bodyW+p5wingW)/2,0,0]){ translate([p5wingW+p5bodyW,0,0]){ //wing right holes translate([p5wingW/2,p5mounthole2back,0]) cylinder(d=p5mountholeOD,h=c2H+0.1,$fn=36); translate([p5wingW/2,p5wingL-p5mounthole2front,0]) cylinder(d=p5mountholeOD,h=c2H+0.1,$fn=36); } //end wing right translate //wing left holes translate([p5wingW/2,p5mounthole2back,0]) cylinder(d=p5mountholeOD,h=c2H+0.1,$fn=36); translate([p5wingW/2,p5wingL-p5mounthole2front,0]) cylinder(d=p5mountholeOD,h=c2H+0.1,$fn=36); }//end translate - center X of holes }//end translate to ring }//end rotate mountain bearing ////// //mounting bolt holes rotate([0,0,((360/c2connectors))]){ //1 translate([0,(cos(pMd1e-pMd0)*((pMID/2)+(pMshelfBoltD)+pMgroove)),0]) translate([-((((c2ID+(pMgroove*2)+(pMwallT*2))/2)*cos(90-(pMd1e-pMd0)))+(pMshelfX/2)),0,0]) cylinder(d=pMshelfBoltD, h=pMH, $fn=36); //2 translate([0,(cos(pMd1e-pMd0)*((pMID/2)+(pMshelfBoltD)+pMgroove)),0]) translate([-((((c2ID+(pMgroove*2)+(pMwallT*2))/2)*cos(90-(pMd1e-pMd0)))+(pMshelfX/2)),0,0]) translate([0,(((((c2ID+(pMgroove*2)+(pMwallT*2))/2)/cos(pMd1e-pMd0))-((pMID/2)+(pMshelfBoltD)+pMgroove))/1.5),0]) cylinder(d=pMshelfBoltD, h=pMH, $fn=36); mirror([1,0,0]){ //1 translate([0,(cos(pMd1e-pMd0)*((pMID/2)+(pMshelfBoltD)+pMgroove)),0]) translate([-((((c2ID+(pMgroove*2)+(pMwallT*2))/2)*cos(90-(pMd1e-pMd0)))+(pMshelfX/2)),0,0]) cylinder(d=pMshelfBoltD, h=pMH, $fn=36); //2 translate([0,(cos(pMd1e-pMd0)*((pMID/2)+(pMshelfBoltD)+pMgroove)),0]) translate([-((((c2ID+(pMgroove*2)+(pMwallT*2))/2)*cos(90-(pMd1e-pMd0)))+(pMshelfX/2)),0,0]) translate([0,(((((c2ID+(pMgroove*2)+(pMwallT*2))/2)/cos(pMd1e-pMd0))-((pMID/2)+(pMshelfBoltD)+pMgroove))/1.5),0]) cylinder(d=pMshelfBoltD, h=pMH, $fn=36); } //end mirror } //end rotate //end of bolt holes ////////////// }//end main difference }//end main translate }//end module // Parametric Involute Bevel and Spur Gears by GregFrost // It is licensed under the Creative Commons - GNU LGPL 2.1 license. // © 2010 by GregFrost, thingiverse.com/Amp // http://www.thingiverse.com/thing:3575 and http://www.thingiverse.com/thing:3752 //================================================== // Bevel Gears: // Two gears with the same cone distance, circular pitch (measured at the cone distance) // and pressure angle will mesh. module gear ( number_of_teeth=Tn, circular_pitch=false, diametral_pitch=false, pressure_angle=28, clearance = 0.2, gear_thickness=5, rim_thickness=8, rim_width=5, hub_thickness=10, hub_diameter=15, bore_diameter=5, circles=0, backlash=0, twist=0, involute_facets=0, flat=false) { if (circular_pitch==false && diametral_pitch==false) echo("MCAD ERROR: gear module needs either a diametral_pitch or circular_pitch"); //Convert diametrial pitch to our native circular pitch circular_pitch = (circular_pitch!=false?circular_pitch:180/diametral_pitch); // Pitch diameter: Diameter of pitch circle. pitch_diameter = number_of_teeth * circular_pitch / 180; pitch_radius = pitch_diameter/2; echo ("Teeth:", number_of_teeth, " Pitch radius:", pitch_radius); CKc2_pitch_radius=pitch_radius; // Base Circle base_radius = pitch_radius*cos(pressure_angle); // Diametrial pitch: Number of teeth per unit length. pitch_diametrial = number_of_teeth / pitch_diameter; // Addendum: Radial distance from pitch circle to outside circle. addendum = 1/pitch_diametrial; //Outer Circle outer_radius = pitch_radius+addendum; //Use if statement and mix/max to select tooth count and circular pitch that creates a radius that is smaller than the OD of the CKp3 //circular pitch defined bt ckp3OD. number of teeth calculated for target addendum. echo("radius",outer_radius); // Dedendum: Radial distance from pitch circle to root diameter dedendum = addendum + clearance; // Root diameter: Diameter of bottom of tooth spaces. root_radius = pitch_radius-dedendum; backlash_angle = backlash / pitch_radius * 180 / pi; half_thick_angle = (360 / number_of_teeth - backlash_angle) / 4; // Variables controlling the rim. rim_radius = root_radius - rim_width; // Variables controlling the circular holes in the gear. circle_orbit_diameter=hub_diameter/2+rim_radius; circle_orbit_curcumference=pi*circle_orbit_diameter; // Limit the circle size to 90% of the gear face. circle_diameter= min ( 0.70*circle_orbit_curcumference/circles, (rim_radius-hub_diameter/2)*0.9); difference() { union () { difference () { linear_exturde_flat_option(flat=flat, height=rim_thickness, convexity=10, twist=twist) gear_shape ( number_of_teeth, pitch_radius = pitch_radius, root_radius = root_radius, base_radius = base_radius, outer_radius = outer_radius, half_thick_angle = half_thick_angle, involute_facets=involute_facets); if (gear_thickness < rim_thickness) translate ([0,0,gear_thickness]) cylinder (r=rim_radius,h=rim_thickness-gear_thickness+1); } if (gear_thickness > rim_thickness) linear_exturde_flat_option(flat=flat, height=gear_thickness) circle (r=rim_radius); if (flat == false && hub_thickness > gear_thickness) translate ([0,0,gear_thickness]) linear_exturde_flat_option(flat=flat, height=hub_thickness-gear_thickness) circle (r=hub_diameter/2); } translate ([0,0,-1]) linear_exturde_flat_option(flat =flat, height=2+max(rim_thickness,hub_thickness,gear_thickness)) circle (r=bore_diameter/2); if (circles>0) { for(i=[0:circles-1]) rotate([0,0,i*360/circles]) translate([circle_orbit_diameter/2,0,-1]) linear_exturde_flat_option(flat =flat, height=max(gear_thickness,rim_thickness)+3) circle(r=circle_diameter/2); } } } module linear_exturde_flat_option(flat =false, height = 10, center = false, convexity = 2, twist = 0) { if(flat==false) { linear_extrude(height = height, center = center, convexity = convexity, twist= twist) child(0); } else { child(0); } } module gear_shape ( number_of_teeth, pitch_radius, root_radius, base_radius, outer_radius, half_thick_angle, involute_facets) { union() { rotate (half_thick_angle) circle ($fn=number_of_teeth*2, r=root_radius); for (i = [1:number_of_teeth]) { rotate ([0,0,i*360/number_of_teeth]) { involute_gear_tooth ( pitch_radius = pitch_radius, root_radius = root_radius, base_radius = base_radius, outer_radius = outer_radius, half_thick_angle = half_thick_angle, involute_facets=involute_facets); } } } } module involute_gear_tooth ( pitch_radius, root_radius, base_radius, outer_radius, half_thick_angle, involute_facets) { min_radius = max (base_radius,root_radius); pitch_point = involute (base_radius, involute_intersect_angle (base_radius, pitch_radius)); pitch_angle = atan2 (pitch_point[1], pitch_point[0]); centre_angle = pitch_angle + half_thick_angle; start_angle = involute_intersect_angle (base_radius, min_radius); stop_angle = involute_intersect_angle (base_radius, outer_radius); res=(involute_facets!=0)?involute_facets:($fn==0)?5:$fn/4; union () { for (i=[1:res]) assign ( point1=involute (base_radius,start_angle+(stop_angle - start_angle)*(i-1)/res), point2=involute (base_radius,start_angle+(stop_angle - start_angle)*i/res)) { assign ( side1_point1=rotate_point (centre_angle, point1), side1_point2=rotate_point (centre_angle, point2), side2_point1=mirror_point (rotate_point (centre_angle, point1)), side2_point2=mirror_point (rotate_point (centre_angle, point2))) { polygon ( points=[[0,0],side1_point1,side1_point2,side2_point2,side2_point1], paths=[[0,1,2,3,4,0]]); } } } } // Mathematical Functions //=============== // Finds the angle of the involute about the base radius at the given distance (radius) from it's center. //source: http://www.mathhelpforum.com/math-help/geometry/136011-circle-involute-solving-y-any-given-x.html function involute_intersect_angle (base_radius, radius) = sqrt (pow (radius/base_radius, 2) - 1) * 180 / pi; // Calculate the involute position for a given base radius and involute angle. function rotated_involute (rotate, base_radius, involute_angle) = [ cos (rotate) * involute (base_radius, involute_angle)[0] + sin (rotate) * involute (base_radius, involute_angle)[1], cos (rotate) * involute (base_radius, involute_angle)[1] - sin (rotate) * involute (base_radius, involute_angle)[0] ]; function mirror_point (coord) = [ coord[0], -coord[1] ]; function rotate_point (rotate, coord) = [ cos (rotate) * coord[0] + sin (rotate) * coord[1], cos (rotate) * coord[1] - sin (rotate) * coord[0] ]; function involute (base_radius, involute_angle) = [ base_radius*(cos (involute_angle) + involute_angle*pi/180*sin (involute_angle)), base_radius*(sin (involute_angle) - involute_angle*pi/180*cos (involute_angle)) ];
CKc3.scad
- todo - remove spacer mounting holes under mountain
- add optional makerbream holes
include <CKvars.scad>; use <CKp8--plateconnector.scad> use <CKpM--mountain.scad> use <mb10.scad>; ////// //TODO // //*spacer mount holes should be further out from ID //*mounting holes for mountain tabs //*test place mountain for fit //*openbeam holes // ////// TF=2; //2 for optional maker beam holes projection(cut = false) CKc3(); /* translate([0,-c3OD/2,0]) translate([0,p3wallOD/2,-pPspace2]) rotate([0,0,0]) CKpM(0); */ //translate([0,0,c3H]) //rotate([0,0,-90]) //CKp8(); echo((c3OD-c3ID)/2); module CKc3(){ rez=p2number*p2needles*2; //calculate desired rezolution $fn=rez; //defines resolution of circles. translate([0,-c3OD/2,0]){ //[c3OD/2,0,0] difference(){ union(){ cylinder(h=c3H,d=c3OD); } //end main union cylinder(h=c3H+2,d=c3ID); // donut hole //plate connector holes for(i=[1:c2connectors-1]){ rotate([0,0,((360/c2connectors)*i)]){ translate([0,p8innerboltO2C,-0.1]) cylinder(d=p8holeD,h=c3H+0.2,$fn=36); translate([0,p8outerboltO2C,-0.1]) cylinder(d=p8holeD,h=c3H+0.2,$fn=36); } //end rotate i } //end for //mountain cutout rotate([0,0,0]){ translate([-(((c2ID+(pMgroove*2)+(pMwallT*2))/2)*cos(90-(pMd1e-pMd0))),0,0]) cube([((((c2ID+(pMgroove*2)+(pMwallT*2))/2)*cos(90-(pMd1e-pMd0)))*2),((c2ID+(pMgroove*2)+(pMwallT*2))/2),c3H]); translate([-(((c2ID+(pMgroove*2)+(pMwallT*2))/2)*cos(90-(pMd1e-pMd0))),((c2ID+(pMgroove*2)+(pMwallT*2))/2),0]) translate([pMshelfBoltD/2,0,0]) cylinder(d=pMshelfBoltD, h=pMH, $fn=36); mirror([1,0,0]) translate([-(((c2ID+(pMgroove*2)+(pMwallT*2))/2)*cos(90-(pMd1e-pMd0))),((c2ID+(pMgroove*2)+(pMwallT*2))/2),0]) translate([pMshelfBoltD/2,0,0]) cylinder(d=pMshelfBoltD, h=pMH, $fn=36); } ////// //mounting bolt holes rotate([0,0,0]){ //1 translate([0,(cos(pMd1e-pMd0)*((pMID/2)+(pMshelfBoltD)+pMgroove)),0]) translate([-((((c2ID+(pMgroove*2)+(pMwallT*2))/2)*cos(90-(pMd1e-pMd0)))+(pMshelfX/2)),0,0]) cylinder(d=pMshelfBoltD, h=pMH, $fn=36); //2 translate([0,(cos(pMd1e-pMd0)*((pMID/2)+(pMshelfBoltD)+pMgroove)),0]) translate([-((((c2ID+(pMgroove*2)+(pMwallT*2))/2)*cos(90-(pMd1e-pMd0)))+(pMshelfX/2)),0,0]) translate([0,(((((c2ID+(pMgroove*2)+(pMwallT*2))/2)/cos(pMd1e-pMd0))-((pMID/2)+(pMshelfBoltD)+pMgroove))/1.5),0]) cylinder(d=pMshelfBoltD, h=pMH, $fn=36); mirror([1,0,0]){ //1 translate([0,(cos(pMd1e-pMd0)*((pMID/2)+(pMshelfBoltD)+pMgroove)),0]) translate([-((((c2ID+(pMgroove*2)+(pMwallT*2))/2)*cos(90-(pMd1e-pMd0)))+(pMshelfX/2)),0,0]) cylinder(d=pMshelfBoltD, h=pMH, $fn=36); //2 translate([0,(cos(pMd1e-pMd0)*((pMID/2)+(pMshelfBoltD)+pMgroove)),0]) translate([-((((c2ID+(pMgroove*2)+(pMwallT*2))/2)*cos(90-(pMd1e-pMd0)))+(pMshelfX/2)),0,0]) translate([0,(((((c2ID+(pMgroove*2)+(pMwallT*2))/2)/cos(pMd1e-pMd0))-((pMID/2)+(pMshelfBoltD)+pMgroove))/1.5),0]) cylinder(d=pMshelfBoltD, h=pMH, $fn=36); } //end mirror } //end rotate //end of bolt holes ////////////// //makerbeam holes if(TF==2){ translate([(TFW/2)-(10/2),((c2ID+(pMgroove*2)+(pMwallT*2))/2)+(10/2),0]) cylinder(d=3, h=pMH, $fn=36); mirror([1,0,0]) translate([(TFW/2)-(10/2),((c2ID+(pMgroove*2)+(pMwallT*2))/2)+(10/2),0]) cylinder(d=3, h=pMH, $fn=36); } } //end main difference } //end main translate } //end CKc3 module
Parts
MakerBeam
mbL=10; MB10(mbL); module MB10(bmL){ for(i=[1:4]){ rotate([0,0,90*i]){ mbCorner(); mirror(1,0,0) mbCorner(); } } } module mbCorner(){ bmX=10; bmCX=4; cornerD=0.2; innerD=0.4; armD1=1; armD2=1.3; boltD=3; hull(){ translate([(bmX/2)-(cornerD/2),(bmX/2)-(cornerD/2),0]) cylinder(d=cornerD, h=mbL, $fn=36); translate([(bmX/2)+(cornerD/2)-3.5,(bmX/2)-(cornerD/2),0]) cylinder(d=cornerD, h=mbL, $fn=36); translate([(bmX/2)+(cornerD/2)-3.5,(bmX/2)+(cornerD/2)-1,0]) cylinder(d=cornerD, h=mbL, $fn=36); translate([(bmX/2)-(cornerD/2),(bmX/2)+(cornerD/2)-1,0]) cylinder(d=cornerD, h=mbL, $fn=36); } hull(){ translate([(bmX/2)-(armD1/2),(bmX/2)-(armD1/2),0]) cylinder(d=armD1, h=mbL, $fn=36); translate([(cos(45)*((boltD+armD2)/2)),(cos(45)*((boltD+armD2)/2)),0]) cylinder(d=armD2, h=mbL, $fn=36); } translate([(bmX/2)-2.276,(bmX/2)-1-(innerD/2),0]) difference(){ union(){ rotate([0,0,45]) translate([innerD,0,mbL/2]) #cube([innerD*2,innerD*2,mbL],center=true); } cylinder(d=innerD,h=mbL,$fn=36); translate([-innerD/2,0,mbL/2]) #cube([innerD,innerD,mbL],center=true); } difference(){ translate([-(bmCX/2),-(bmCX/2),0]) cube([bmCX,bmCX,mbL]); cylinder(d=boltD,h=mbL,$fn=36); } } //end corner module
Aluminum Angle Corner
- https://www.diy.com/departments/aluminium-corner-h-10mm-w-10mm-l-2m/254056_BQ.prd
- 10mm x 10mm
- https://www.homedepot.com/p/Everbilt-1-2-in-x-96-in-Aluminum-Angle-Bar-with-1-20-in-T-802677/204273980
- 1/2" ~ 12.7mm
Full Assembly
include <CKvars.scad>; use <CKneedle.scad>; use <CKp1--motor_gear.scad>; use <CKp2--inner.scad>; use <CKp3--outer.scad>; use <CKp4--yardHolder.scad>; use <CKp5--smallbearingholder.scad>; //use <CKp6--bigbearingholder.scad>; use <CKp7--Zbearingholder.scad>; use <CKp8--plateconnector.scad>; use <CKp9--outerconnector.scad>; use <CKpM--mountain.scad>; use <CKc1--tabletop.scad>; use <CKc2--bottom_surface_motor_gears.scad>; use <CKc3--topplate.scad>; //needle rotate([0,0,0]){ //-(360/p2number*p2needles)/2 translate([0,0,-nB+(pPspace1+pPplate1)]) rotate([0,0,-((360/p2number/p2needles)*3.5)+((360/p4number))]) //(360/(p2number*p2needles))*1 translate([(-p3wallID/2)+(p2needlegrooveDepthslop/2),0,0]) translate([0,nX/2,0]) rotate([90,0,0]) needle(); translate([0,0,-nB+(pPspace1+pPplate1+pMgrooveC1-nC)]) rotate([0,0,((360/(p2number*p2needles))*1)-((360/p2number/p2needles)*3.5)+((360/p4number))]) translate([(-p3wallID/2)+(p2needlegrooveDepthslop/2),0,0]) translate([0,nX/2,0]) rotate([90,0,0]) needle(); translate([0,0,-nB+(pPspace1+pPplate1+pMgrooveC2-nC)]) rotate([0,0,((360/(p2number*p2needles))*2)-((360/p2number/p2needles)*3.5)+((360/p4number))]) translate([(-p3wallID/2)+(p2needlegrooveDepthslop/2),0,0]) translate([0,nX/2,0]) rotate([90,0,0]) needle(); translate([0,0,-nB+(pPspace1+pPplate1+pMgrooveC3-nC-(pMgrooveD-nC))]) rotate([0,0,((360/(p2number*p2needles))*3)-((360/p2number/p2needles)*3.5)+((360/p4number))]) translate([(-p3wallID/2)+(p2needlegrooveDepthslop/2),0,0]) translate([0,nX/2,0]) rotate([90,0,0]) needle(); } //c1 translate([-c1OD/2,0,-c1H]) CKc1(); //p1 - motor gear rotate([0,0,0]) translate([-(CKp1_pitch_radius+CKc2_pitch_radius),0,1]) CKp1(); //p2 - inner wall needle guide for(i=[1:p2number]){ rotate([0,0,i*(360/p2number)]) translate([-p2OD/2,0,p3base45H]) CKp2(); } //p3 - outer wall for(i=[1:p3number]){ rotate([0,0,i*(360/p3number)]) translate([-p3baseOD/2,0,0]) CKp3(); } //p9 - connector for p3 for(i=[1:p3number]){ rotate([0,0,i*(360/p3number)]) translate([-p3wallOD/2,0,(p2holeH)-(p9H/2)]) rotate([0,0,180]) CKp9(); }//end for //p4 - yard holder at top for(i=[1:p4number]){ rotate([0,0,-((360/p2number/p2needles)*3.5)+(i*(360/p4number))]) translate([-(p4baseOD/2),0,p3base45H+p2H-p4basegapH]) CKp4(); } //p7 Z for(i=[1:c2bmounts]){ rotate([0,0,((45)+((360/c2bmounts)*i))]){ translate([0,(c3OD/2)-p7bearingfromfront-(p7wiggleL/2)-bearingholderZBW,0]){ //close enough? //trans Y old : (c3OD/2)-((p7mountL-p7wallW)/2)-((bearingholderZBW+p7wiggleL)/2)-(p7wiggleL/2) CKp7(1); }//end translate }//end rotate }//end for ////////////////// //ROTATING SECTION rotate([0,0,360/c2connectors/2]){ //c2 translate([0,c3OD/2,pPspace1]) CKc2(); //c3 translate([0,c3OD/2,pPspace1+pPplate1+pPspace2]) CKc3(); //p5 - small bearing holder for(i=[1:c2bmounts]){ rotate([0,0,((360/c2connectors)*1.5)+((360/c2bmounts)*i)]){ translate([0,(p3baseOD/2)+1,pPspace1]){ mirror([0,0,1]) CKp5(1); //small bearing holder }//end translate }//end rotate }//end for //small bearing holder - under mountain rotate([0,0,0]){ translate([0,(p3baseOD/2)+1,pPspace1]){ mirror([0,0,1]) CKp5(1); //small bearing holder }//end translate }//end rotate //p8 translate([0,0,pPspace1+pPplate1]) for(i=[1:c2connectors]){ rotate([0,0,((360/c2connectors)*i)]){ translate([0,(pMID/2)+(pMgroove)+1+(p8baseL/2),0]){ translate([0,-p8baseL/2,-0.1]) CKp8(); }//end translate }//end rotate }//end for //mountain translate([0,0,0]) translate([0,p3wallOD/2,(pPspace1+pPplate1+pPspace2+pPplate2)-(pPspace2+pPplate2)]) rotate([0,0,0]) CKpM(0); } //end rotate //END ROTATING SECTION //////////////////////
BOM
- Use echo to list parts used
include <CKvars.scad>; use <CKneedle.scad>; use <CKp1--motor_gear.scad>; use <CKp2--inner.scad>; use <CKp3--outer.scad>; use <CKp4--yardHolder.scad>; use <CKp5--smallbearingholder.scad>; //use <CKp6--bigbearingholder.scad>; use <CKp7--Zbearingholder.scad>; use <CKp8--plateconnector.scad>; use <CKp9--outerconnector.scad>; use <CKpM--mountain.scad>; use <CKc1--tabletop.scad>; use <CKc2--bottom_surface_motor_gears.scad>; use <CKc3--topplate.scad>; echo("===Bill of Materials==="); //needle echo("Needles:", p2number*p2needles); //c1 //Wood Mount Screws echo("c1 Wood Screws","Size:",woodbeamScrewOD,"x",c1H+6,"mm","Count:",(16)); echo("c1 Stepper Socket Cap Screws","Size: M",NEMAboltOD,"x",c1H+4,"mm","Count:",(c1steppersnumber*4)); //p1 - motor gear echo("p1 Bolts","Size: M",NEMAsetboltOD,"x",NEMAsetboltL,"mm","Count:",(c1steppersnumber)); //M3 Base Nuts echo("p1 Square Nuts","Size: M",NEMAsetboltOD,"Count:",(c1steppersnumber)); //p2 - inner wall needle guide //see p3 //p3 - outer wall //M3 Base Bolts - 12 echo("p3 Bolts","Size: M",p3baseholeD,"x",ceil((p3baseH+table_surface+p3baseholeD+1)/2)*2,"mm","Count:",(p3number*p3baseholenumber)); //M3 Base Nuts echo("p3 Nuts","Size: M",p3baseholeD,"Count:",(p3number*p3baseholenumber)); echo("p3/p9 Socket Cap Screws","Size: M",p2holeD,"x",p3upperwallW+p2W-p2holeCSL+p9thickness+p2holeD,"mm","Count:",p3number*4); echo("p3/p2 Socket Cap Screws","Size: M",p2holeD,"x",p3upperwallW+p2W-p2holeCSL+p2holeD,"mm","Count:",(p2number*2)-(p3number*2)); //p9 - connector for p3 //see p3 //p4 - yard holder at top //M2 Socket Cap Srews echo("p4 Socket Cap Screws","Size: M",p2holeD,"x",((p4baseOD-p4baseID)/2)-p2holeCSL,"mm","Count:",p2number*2); //p7 Z //M3 Base Bolts - 12 echo("p7 Bolts","Size: M",p7mountholeOD,"x",ceil((p7baseH+table_surface+p7mountholeOD-0.25)/2)*2,"mm","Count:",(p7number*3)); //M3 Base Nuts echo("p7 Nuts","Size: M",p7mountholeOD,"Count:",(p7number*3)); ////////////////lock nut size? //M5 Bearing Mount Bolt echo("p7 Bearing Bolts","Size: M",p7boltD,"x",p7boltL,"mm","Count:",p7number); //M5 Bearing Mount Nut echo("p7 Bearing Nuts","Size: M",p7boltD,"Count:",p7number); //Bearing (bore 5mm x 10mm x 4mm) echo("p7 Bearings","Bore:",bearingholderZBID,"x","OD:",bearingholderZBOD,"x","Width:",bearingholderZBW,"Count:",(p7number)); ////////////////// //ROTATING SECTION //rotate([0,0,360/c2connectors/2]){ //c2 //translate([0,c3OD/2,pPspace1]) //CKc2(); //c3 //translate([0,c3OD/2,pPspace1+pPplate1+pPspace2]) //CKc3(); //p5 - small bearing holder //for(i=[1:c2bmounts]){ // rotate([0,0,((360/c2connectors)*1.5)+((360/c2bmounts)*i)]){ // translate([0,(p3baseOD/2)+1,pPspace1]){ // mirror([0,0,1]) //CKp5(1); //small bearing holder // }//end translate // }//end rotate //}//end for //small bearing holder - under mountain // rotate([0,0,0]){ // translate([0,(p3baseOD/2)+1,pPspace1]){ // mirror([0,0,1]) //CKp5(1); //small bearing holder // }//end translate // }//end rotate //p8 //translate([0,0,pPspace1+pPplate1]) // for(i=[1:c2connectors-1]){ // rotate([0,0,((360/c2connectors)*i)]){ // translate([0,(pMID/2)+(pMgroove)+1+(p8baseL/2),0]){ // translate([0,-p8baseL/2,-0.1]) // CKp8(); // }//end translate // }//end rotate // }//end for //mountain //translate([0,0,0]) //translate([0,p3wallOD/2,(pPspace1+pPplate1+pPspace2+pPplate2)-(pPspace2+pPplate2)]) //rotate([0,0,0]) //CKpM(0,1,1); //((360/(p2number*p2needles))*3)-((360/p2number/p2needles)*3.5)+((360/p4number)) //translate([0,0,-nB+(pPspace1+pPplate1+pMgrooveC3-nC-(pMgrooveD-nC))]) //rotate([0,0,-90]) //translate([(-p3wallID/2)+(p2needlegrooveDepthslop/2),0,0]) //translate([0,nX/2,0]) //rotate([90,0,0]) //needle(); // } //end rotate //END ROTATING SECTION //////////////////////
To Do
- make motor's gear optionally 3d printed or laser cut utilizing Pololu hub
- make an optional plywood cnc cut board that pairs with c1 table top
- calculate angle from OD of needle's hook at lowest poistion to the top of p4 base
- what is ideal? +45? force pulling loop away from latch minimized at lower angles?
- thread feeder hole, measure knot diameter
- maybe 4-5mm? need to accomidate end/begining thread connecting knots
- yarn stick holder etc
- tensioner etc
- printable bowl to hold bag of water on fabric tension plate?
Test
- determine smallest diameter machine
- what needs to change to go smaller?
- create a minimum c1 table top dimension?
- do some of the parts render incorrectly if over 180degrees around circle?
- what needs to change to go smaller?
- test larger machine size
- what are the standard diameters of fabric
//number of "p2" parts around circle //Jan2019 //small p2number=8; //12 //36 ///36 //12 //8 //number of needles mounted on each "p2" part p2needles=7; //5 //10 ///5 //5 //7 //number of "p3" parts around circle p3number=2; //4 //18 ///4 //4 //2 //number of "p4" parts around circle p4number=2; //4 //18 ///4 //4 //2 //distance from the inside face of one needle to the next needle2needle=9.25; //default=14.35615 //try 8.414 //13.5334 //9.25 pMgrooveturnR=10; //radius of upper curved path in groove //14 //10 pMgrooveturnR2=7; //radius of lower curved path in groove //7 pMgrooveturnR3=7; // radius of entrance curved path pMp7X=2; //half of length of plateu of groove. preferably whole number //3 //2 pMp3X=2; //length of lower plateu of groove //2.5 //2
- lower length of groove7 and groove3?
- might change back to M2 or M2.5 sized bolts
Known Bugs
- Only 45 degree angle works for mountain groove path
- curved paths break, something in the sin/cos is not correct
- needle2needle value doesnt seem to be rendering exactly as was measured on original stl
Future Work
- create design so that mountains are stationary and needles rotate
- add multiple mountains, yarn can remain stationary
- output fabric spool must rotate too
- RotoKnitic v19.01
- sock heels
- mechanism to raise needles to a position above mountain so they can skip loops
Internal Links
- Open Source Textile Construction Set
- Open Source Circular Knitting Machine
- CircularKnitic Parametric
External Links
- https://en.wikipedia.org/wiki/Trigonometric_functions
- https://en.wikipedia.org/wiki/List_of_gear_nomenclature
- https://en.wikipedia.org/wiki/Gear#Nomenclature
- https://en.wikipedia.org/wiki/Bolt_(fabric)
- https://www.wyzant.com/resources/lessons/math/algebra/properties_of_algebra
- https://en.wikipedia.org/wiki/Arc_(geometry)#Arc_radius
- Casting On
- Casting Off