OSE CircularKnitic v18.03: Difference between revisions
Jump to navigation
Jump to search
| Line 1: | Line 1: | ||
=Overview= | =Overview= | ||
* 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 | * Code available on GitHub https://github.com/OpenSourceEcology/circular_knitic | ||
Revision as of 02:47, 29 May 2018
Overview
- OSE's Fork of CircularKnitic, the open source circulate knitting machine
- Code available on GitHub https://github.com/OpenSourceEcology/circular_knitic
Goals
Needle Accomidation
- Long tails
- Bent back tails
- Test 3D printed needles
Fabric Spool
- Apply constant tension on fabric
- Roll onto spool for easy handling and storage
Part Code
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
- need to define nominal distance between top of needle to top of CKp4.
- need to increase number of p3 and p4 parts.
- calculate printer footprint for each part.
////MAIN SETTINGS////
//select needle size file that will be used
include <CKneedleVars-KH260.scad>;
//number of "p2" parts around circle
p2number=36;
//number of needles mounted on each "p2" part
p2needles=10;
//number of "p3" parts around circle
p3number=18;
//number of "p4" parts around circle
p4number=18;
//distance from the inside face of one needle to the next
needle2needle=8.414; //default=14.35615
//calculated diameter from inside edge of needles
p2needlegrooveID=((needle2needle*p2number*p2needles)/PI);
////MATERIALS////
upper_surfaceH=5; //thickness of upper rotating plate
bottom_surface_motor_gearsH=6; //thickness of geared rotating plate
////PART SETTINGS////
//plate
pPspace1=12; //? space from main table top to first plate
pPplate1=6; //thickness of geared plated
pPspace2=12; //space between geared plate and mountain plate
pPplate2=5;
//"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
//BearringSmall1312_x_4.stl
bearingholderSmallB2C=5.5; //from base of bearing holder to center of bearing
bearingholderSmallBOD=10; //Outside Diameter of bearing
bearingholderSmallBID=5; //Inside Diameter of bore hole of bearing
bearingholderSmallBW=4; //Width of bearing
//BearringZ
bearingholderZBOD=10; //Outside Diameter of bearing
bearingholderZBID=5; //Inside Diameter of bore hole of bearing
bearingholderZBW=4; //Width of bearing
bearingholderZB2C=(bearingholderZBOD/2)+upper_surfaceH+connector0912H+bottom_surface_motor_gearsH+bearingholderSmallB2C+(bearingholderSmallBOD/2); //from base of bearing holder to center of bearing
//p2
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;
p2holeCSD=4.01726;
p2holeCSL=1.5;
p2clear=0.5; //distance above top of p4 from flipper in down position
//p3
p3wiggle=0.1;
p3baseH=3;
p3wallW=(nH-nY)/2; //half of needle butt
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
p3grooveWslop=0.8; //extra Width in needle groove
p3grooveW=nX+p3grooveWslop;
p3clear=5; //distance from top of p3 to needle flipper in down position
p3baseID=p2ID-(p3wiggle*2)-(p3ridgeW2*2)-(p3baseholeScrewHeadD*2);
p3baseOD=p2OD+(p3wiggle*2)+(p3wallW*2)+(p3wallchamfW*2)+(p3baseholeScrewHeadD*2);
//p4
p4rampW=4;
p4rampH=14.57;
p4rampfromID=2.5;
p4rampoverhangH=4;
p4rampfromOD=1.34;
p4rampC1=10;
p4rampC2=40;
p4rampC2transX=10;
p4rampC2transZ=3.82;
p4baseH=11;
p4basegapH=8;
p4baseW=11.2;
p4basegapW=5.09;
p4clawW=9;
p4holesnumber=3;
p4holeH=5;
//mountain
pMwallT=7.5; //min thickness from groove to back wall
pMgroove=nH-nY-p3wallW+1; //depth of groove
pMgrooveAngle=45;
pMgrooveC1=pPspace2; //top of groove at position 1 "entrance"
pMgrooveC2=nC+2; //top of groove at position 2 "push down"
pMgrooveC3=44.25; //top of groove at position 3 "top center"
pMgrooveSlop=2;
pMwallHextra=5.75; //extra height above groove at heighest point
//calculated settings
centerlineD=p2ID+(p2W+(p3wiggle*2));
p3grooveH1=bottom_surface_motor_gearsH+bearingholderSmallB2C+(bearingholderSmallBOD/2)+(pMgrooveSlop/2);
p3grooveH2=p3grooveH1+pMgrooveC3+(pMgrooveSlop/2);
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;
p2H=bottom_surface_motor_gearsH+bearingholderSmallB2C+(bearingholderSmallBOD/2)+pMgrooveC3+nA-nB-nC-nF-p3baseH-(p4rampH+p4baseH-p4basegapH)-p2clear;;
p3wallH=bottom_surface_motor_gearsH+bearingholderSmallB2C+(bearingholderSmallBOD/2)+pMgrooveC2+nA-nB-nC-nF-p3clear;
p2holeH=p3grooveH2+((p3wallH-p3grooveH2)/2);
////SETTINGS OUTPUT ECHOS///
echo("Total Needles:", p2number*p2needles);
echo("Millimeters Between Needles:", PI*p2needlegrooveID/(p2number*p2needles));
echo("OD of p3:", p3baseOD);
Needles
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
CKp2.scad
include <CKvars.scad>;
CKp2();
module CKp2(){
rez=360/p2number*2*2;
$fn=rez; //defines resolution of circles.
translate([p2OD/2,0,0]){
difference(){
cylinder(h=p2H,d=p2OD);
cylinder(h=p2H,d=p2ID);
translate([-p2OD/2,-p2OD/2,0]){
cube([p2OD,p2OD/2,p2H]);
}
rotate([0,0,-360/p2number]){
translate([-p2OD/2,0,0])
cube([p2OD,p2OD/2,p2H]);
}
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]);
}
}
rotate([0,0,-360/p2number/p2needles]){
translate([-p2OD/2-0.2,0,p2holeH])
rotate([0,90,0]){
union(){
cylinder(h=p2OD-p2ID+0.2, d=p2holeD);
translate([0,0,((p2OD-p2ID)/2)-p2holeCSL]){
cylinder(h=p2holeCSL+2, d=p2holeCSD);
}
} //end union
}
}
rotate([0,0,-360/p2number/p2needles*(p2needles-1)]){
translate([-p2OD/2-0.2,0,p2holeH])
rotate([0,90,0]){
union(){
cylinder(h=p2OD-p2ID+0.2, d=p2holeD);
translate([0,0,((p2OD-p2ID)/2)-p2holeCSL]){
cylinder(h=p2holeCSL+2, d=p2holeCSD);
}
} //end union
}
}
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;
rotate([0,0,-firstcenter]){
translate([-p2OD/2-0.2,0,p2holeH])
rotate([0,90,0]){
union(){
cylinder(h=p2OD-p2ID+0.2, d=p2holeD);
translate([0,0,((p2OD-p2ID)/2)-p2holeCSL]){
cylinder(h=p2holeCSL+2, d=p2holeCSD);
}
} //end union
}
}
rotate([0,0,-360/p2number+firstcenter]){
translate([-p2OD/2-0.2,0,p2holeH])
rotate([0,90,0]){
union(){
cylinder(h=p2OD-p2ID+0.2, d=p2holeD);
translate([0,0,((p2OD-p2ID)/2)-p2holeCSL]){
cylinder(h=p2holeCSL+2, d=p2holeCSD);
}
} //end union
}
}
}
}
} //end module
CKp3.scad
- Added holes in base for long tails
- does this need to be bigger to allow for some slop?
- what to do if needle has bent back tail?
include <CKvars.scad>;
CKp3();
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);
difference(){
cylinder(h=p3ridgeH+p3baseH,d=centerlineD-((p2W+(p3wiggle*2)/2)));
translate([0,0,p3baseH])
cylinder(h=p3ridgeH,d1=centerlineD-(p3ridgeW2*2)-((p2W+(p3wiggle*2)/2)),d2=centerlineD-(p3ridgeW1*2)-((p2W+(p3wiggle*2)/2)));
}
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);
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]);
}
//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])
cube([p3wallW+0.2,p3grooveW,p3grooveH2-p3grooveH1]);
}
}
//base needle holes
for(i=[1:p2needles*(p2number/p3number)]){
rotate([0,0,(360/p2number/p2needles/2)-(360/p2number/p2needles*i)]){
translate([-p2OD/2,-needleWidth/2,-0.01])
cube([p2needlegrooveDepth,needleWidth,p3wallH+0.02]);
}
}
//base mounting holes
for(i=[1:p3baseholenumber]){
rotate([0,0,(((360/p3number/p3baseholenumber))/2)-((360/p3number/p3baseholenumber)*i)]){
translate([-(p3baseID/2)-p3baseholefromODID,0,0])
cylinder(h=p3baseH,d=p3baseholeD,$fn=18);
}
}
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);
}
}
//first and last holes
rotate([0,0,-firstcenter]){
translate([((-centerlineD-(p3wallW*2)-((p2W+(p3wiggle*2)/2)))/2)-0.1,0,p2holeH+p3baseH])
rotate([0,90,0]){
cylinder(h=p2OD-p2ID+0.2, d=p2holeD, $fn=18);
}
}
rotate([0,0,-(360/(p3number))+firstcenter]){
translate([((-centerlineD-(p3wallW*2)-((p2W+(p3wiggle*2)/2)))/2)-0.1,0,p2holeH+p3baseH])
rotate([0,90,0]){
#cylinder(h=p2OD-p2ID+0.2, d=p2holeD, $fn=18);
}
}
//middle holes
for(i=[0:(p2number/p3number)-1]){
rotate([0,0,(-360/p2number/p2needles)+(i*-360/p2number)]){
translate([((-centerlineD-(p3wallW*2)-((p2W+(p3wiggle*2)/2)))/2)-0.1,0,p2holeH+p3baseH])
rotate([0,90,0]){
cylinder(h=p2OD-p2ID+0.2, d=p2holeD,$fn=18);
}
}
} //end for
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+p3baseH])
rotate([0,90,0]){
cylinder(h=p2OD-p2ID+0.2, d=p2holeD, $fn=18);
}
}
}//end for
//end middle holes
}
}
} //end module
CKpM.scad "mountain"
- need to test with different size needle and spaces between plates
- takes a long time to render, have to be patient
- need to up the resolution of circles at large diameter machine
- need to set a minimum thickness of the mountain.
- mounting brackets not rendering correctly on large diameter machine
include <CKvars.scad>;
CKpM(); //mountain
CKpMgrooveturnR=15; //radius of upper curved path in groove
CKpMgrooveturnR2=8; //radius of lower curved path in groove
CKpMgrooveD=nC+pMgrooveSlop; //diamter of groove cut
CKpMID=p2OD+2; //inside diameter of main wall
CKpMgrooveOD=pMgroove+(CKpMID/2); //center to OD of groove
CKpMp7X=5; //half of length of plateu of groove. preferably whole number
CKpMp3X=2.5; //length of flat area of section 3
CKpMcutRez=2; //cuts per degree
CKpMcutDeg=(((CKpMp7X/2)*360/(PI*CKpMID))/CKpMp7X); //degrees per unit diameter
CKpMcutcylRez=36; //number of sides on groove cutting clylinder
CKpMcutA=45; //angle of cut path
//calc'd
mi=(CKpMID*PI)/360; //degrees in mm at CKpMID
echo("mi=");
echo(mi);
CKpMd7=round((CKpMp7X)*360/(PI*CKpMID)*10)/10; //degrees around ID
echo(CKpMd7);
CKpMd6=round((cos(CKpMcutA)*CKpMgrooveturnR)*360/(PI*CKpMID)*10)/10;
echo(CKpMd6);
CKpMp6Y=0;
CKpMd5=round((tan(CKpMcutA)*(((pMgrooveC3-(CKpMgrooveD/2)+(CKpMgrooveturnR*cos(asin((((CKpMd7+CKpMd6)-CKpMd7)*(PI*CKpMID)/360)/CKpMgrooveturnR))-CKpMgrooveturnR))-((CKpMgrooveD/2)+((sin(CKpMcutA)*CKpMgrooveturnR2)*360/(PI*CKpMID))))))*360/(PI*CKpMID)*10)/10;
// not good code CKpMd5=round((cos(CKpMcutA)*(pMgrooveC3+pMwallHextra+(CKpMgrooveD/2)))*360/(PI*CKpMID)*10)/10;
//height of center of circle at top of 5 //pMgrooveC3-(CKpMgrooveD/2)+(CKpMgrooveturnR*cos(asin((((CKpMd7+CKpMd6)-CKpMd7)*(PI*CKpMID)/360)/CKpMgrooveturnR))-CKpMgrooveturnR)
//height of center of circle at bottom of 5
//CKpMgrooveD+((sin(CKpMcutA)*CKpMgrooveturnR2)*360/(PI*CKpMID))
//total height of 5 //((pMgrooveC3-(CKpMgrooveD/2)+(CKpMgrooveturnR*cos(asin((((CKpMd7+CKpMd6)-CKpMd7)*(PI*CKpMID)/360)/CKpMgrooveturnR))-CKpMgrooveturnR))-(CKpMgrooveD+((sin(CKpMcutA)*CKpMgrooveturnR2)*360/(PI*CKpMID))))
echo(CKpMd5);
//center to center degrees in section 4
CKpMd4=round((cos(CKpMcutA)*CKpMgrooveturnR2)*360/(PI*CKpMID)*10)/10;
//old bad code CKpMd4=(cos(CKpMcutA)*((pMgrooveC3-(CKpMgrooveD/2)+(CKpMgrooveturnR*cos(asin(((((CKpMd7+(CKpMd6))-(0.1))-CKpMd7)*(PI*CKpMID)/360)/CKpMgrooveturnR))-CKpMgrooveturnR))-((cos(CKpMcutA)*CKpMgrooveturnR))));
echo(CKpMd4);
CKpMd3=round((CKpMp3X)*360/(PI*CKpMID)*10)/10; //degrees around ID
echo(CKpMd3);
CKpMd2=round((cos(CKpMcutA)*CKpMgrooveturnR2)*360/(PI*CKpMID)*10)/10;
echo(CKpMd2);
//height of center of circle at top of 2
//CKpMgrooveD+((sin(CKpMcutA)*CKpMgrooveturnR2)*360/(PI*CKpMID))
//need to fix below
CKpMd1=round(((cos(CKpMcutA)*((pMgrooveC1-(((((CKpMgrooveD/2)-(CKpMgrooveturnR2*cos(asin((((CKpMd7+CKpMd6+CKpMd5+CKpMd4+CKpMd3+CKpMd2)-(CKpMd7+CKpMd6+CKpMd5+CKpMd4+CKpMd3))*(PI*CKpMID)/360)/CKpMgrooveturnR2))-CKpMgrooveturnR2)))))-(sin(CKpMcutA)*(CKpMgrooveD/2)))*(1/sin(CKpMcutA)))))*360/(PI*CKpMID)*10)/10;
echo("degrees 1:");
echo(CKpMd1);
CKpMd0=(cos(CKpMcutA)*(CKpMgrooveD/2))*360/(PI*CKpMID);
pMH=pMgrooveC3+pMwallHextra;
pMbwOD=((p2OD+2)/2)+pMwallT+pMgroove;
echo(pMbwOD);
module CKpM(){
//test cube
// translate([-71.4,120,0])
// cube([pMgrooveC1,pMgrooveC1,pMgrooveC1]);
union(){
difference(){
translate([-(p2OD+2),0,0])
cube([(p2OD+2)*2,((p2OD+2)/2)+pMwallT+pMgroove,pMH]);
cylinder($fn=180,d=CKpMID, h=pMH);
//cut main end
//need to calc exactly so height of path entrance matches bottom of top plate
rotate([0,0,(CKpMd7+CKpMd6+CKpMd5+CKpMd4+CKpMd3+CKpMd2+CKpMd1-CKpMd0)])
mirror([1,0,0])
cube([CKpMID*4,CKpMID*4,pMH]);
mirror([1,0,0])
rotate([0,0,(CKpMd7+CKpMd6+CKpMd5+CKpMd4+CKpMd3+CKpMd2+CKpMd1-CKpMd0)])
mirror([1,0,0])
cube([CKpMID*4,CKpMID*4,pMH]);
//left needle path cut
needlepathLEFT();
//right needle path cut
mirror([1,0,0])
needlepathLEFT();
} //end main difference
pMsidetab();
mirror([1,0,0])
pMsidetab();
} //end main union
} //end main module
module pMsidetab(){
translate([0,0,pPspace2+pPplate2])
difference(){
rotate([0,0,-(CKpMd7+CKpMd6+CKpMd5+CKpMd4+CKpMd3+CKpMd2+CKpMd1-CKpMd0)])
difference(){
union(){
cube([12.5,(pMbwOD*2),4]);
translate([0,0,4])
difference(){
cube([4,(pMbwOD*2),4]);
translate([4,0,0])
rotate([0,-45,0])
cube([8,(pMbwOD*2),8]);
}
}
translate([4+(8.5/2),(CKpMID/2)+13.5,0])
cylinder($fn=36,d=3,h=5);
translate([4+(8.5/2),(pMbwOD*(1/cos(CKpMd7+CKpMd6+CKpMd5+CKpMd4+CKpMd3+CKpMd2+CKpMd1-CKpMd0)))-5.5,0])
cylinder($fn=36,d=3,h=5);
}
translate([0,-50,0])
cube([(CKpMID/2),((CKpMID/2)+3.5)*cos(CKpMd7+CKpMd6+CKpMd5+CKpMd4+CKpMd3+CKpMd2+CKpMd1-CKpMd0)+50,(CKpMID/2)]);
translate([0,pMbwOD,0])
cube([(pMbwOD*2),(pMbwOD*2),(pMbwOD*2)]);
}
} //end sidetab module
module needlepathLEFT(){
//////////////////////
// needle path //
//////////////////////
//7
for(i=[(0.1):(0.2):CKpMd7-(0.1)]){
hull(){
//odd
translate([0,0,pMgrooveC3-(CKpMgrooveD/2)])
rotate([270,0,i-(0.1)])
cylinder($fn=CKpMcutcylRez,d=CKpMgrooveD,h=CKpMgrooveOD);
//even
translate([0,0,pMgrooveC3-(CKpMgrooveD/2)])
rotate([270,0,i])
cylinder($fn=CKpMcutcylRez,d=CKpMgrooveD,h=CKpMgrooveOD);
}//end hull 1
hull(){
//even
translate([0,0,pMgrooveC3-(CKpMgrooveD/2)])
rotate([270,0,i])
cylinder($fn=CKpMcutcylRez,d=CKpMgrooveD,h=CKpMgrooveOD);
//odd
translate([0,0,pMgrooveC3-(CKpMgrooveD/2)])
rotate([270,0,i+(0.1)])
cylinder($fn=CKpMcutcylRez,d=CKpMgrooveD,h=CKpMgrooveOD);
}//end hull 2
}//end fors
//6
for(i=[(CKpMd7)+(0.1):(0.2):(CKpMd7+(CKpMd6))-(0.1)]){
hull(){
//odd
translate([0,0,pMgrooveC3-(CKpMgrooveD/2)+(CKpMgrooveturnR*cos(asin(((i-CKpMd7-(0.1))*(PI*CKpMID)/360)/CKpMgrooveturnR))-CKpMgrooveturnR)])
rotate([270,0,i-(0.1)])
cylinder($fn=CKpMcutcylRez,d=CKpMgrooveD,h=CKpMgrooveOD);
//even
translate([0,0,pMgrooveC3-(CKpMgrooveD/2)+(CKpMgrooveturnR*cos(asin(((i-CKpMd7)*(PI*CKpMID)/360)/CKpMgrooveturnR))-CKpMgrooveturnR)])
rotate([270,0,i])
cylinder($fn=CKpMcutcylRez,d=CKpMgrooveD,h=CKpMgrooveOD);
}//end hull 1
hull(){
//even
translate([0,0,pMgrooveC3-(CKpMgrooveD/2)+(CKpMgrooveturnR*cos(asin(((i-CKpMd7)*(PI*CKpMID)/360)/CKpMgrooveturnR))-CKpMgrooveturnR)])
rotate([270,0,i])
cylinder($fn=CKpMcutcylRez,d=CKpMgrooveD,h=CKpMgrooveOD);
//odd
translate([0,0,pMgrooveC3-(CKpMgrooveD/2)+(CKpMgrooveturnR*cos(asin(((i-CKpMd7+(0.1))*(PI*CKpMID)/360)/CKpMgrooveturnR))-CKpMgrooveturnR)])
rotate([270,0,i+(0.1)])
cylinder($fn=CKpMcutcylRez,d=CKpMgrooveD,h=CKpMgrooveOD);
}//end hull 2
}//end fors
//5
for(i=[(CKpMd7+CKpMd6)+(0.1):(0.2):(CKpMd7+CKpMd6+CKpMd5+CKpMd4)-(0.1)]){
hull(){
//odd
translate([0,0,pMgrooveC3-(CKpMgrooveD/2)+(CKpMgrooveturnR*cos(asin(((((CKpMd7+(CKpMd6))-(0.0))-CKpMd7)*(PI*CKpMID)/360)/CKpMgrooveturnR))-CKpMgrooveturnR)-((tan(CKpMcutA)*(i-0.1-(CKpMd7+CKpMd6))*mi))])
rotate([270,0,i-(0.1)])
cylinder($fn=CKpMcutcylRez,d=CKpMgrooveD,h=CKpMgrooveOD);
//even
translate([0,0,pMgrooveC3-(CKpMgrooveD/2)+(CKpMgrooveturnR*cos(asin(((((CKpMd7+(CKpMd6))-(0.0))-CKpMd7)*(PI*CKpMID)/360)/CKpMgrooveturnR))-CKpMgrooveturnR)-((tan(CKpMcutA)*(i-(CKpMd7+CKpMd6-0.0))*mi))])
rotate([270,0,i])
cylinder($fn=CKpMcutcylRez,d=CKpMgrooveD,h=CKpMgrooveOD);
} //end hull 1
hull(){
//even
translate([0,0,pMgrooveC3-(CKpMgrooveD/2)+(CKpMgrooveturnR*cos(asin(((((CKpMd7+(CKpMd6))-(0.0))-CKpMd7)*(PI*CKpMID)/360)/CKpMgrooveturnR))-CKpMgrooveturnR)-((tan(CKpMcutA)*(i-(CKpMd7+CKpMd6-0.0))*mi))])
rotate([270,0,i])
cylinder($fn=CKpMcutcylRez,d=CKpMgrooveD,h=CKpMgrooveOD);
//odd
translate([0,0,pMgrooveC3-(CKpMgrooveD/2)+(CKpMgrooveturnR*cos(asin(((((CKpMd7+(CKpMd6))-(0.0))-CKpMd7)*(PI*CKpMID)/360)/CKpMgrooveturnR))-CKpMgrooveturnR)-((tan(CKpMcutA)*(i+0.1-(CKpMd7+CKpMd6))*mi))])
rotate([270,0,i+(0.1)])
cylinder($fn=CKpMcutcylRez,d=CKpMgrooveD,h=CKpMgrooveOD);
} //end hull 2
} //end for
//4
for(i=[(CKpMd7+CKpMd6+CKpMd5)-(0.1):(0.2):(CKpMd7+CKpMd6+CKpMd5+CKpMd4)+(0.1)]){
translate([0,0,(CKpMgrooveD/2)-(CKpMgrooveturnR2*cos(asin(((i-(CKpMd7+CKpMd6+CKpMd5)-(0.0))*(PI*CKpMID)/360)/CKpMgrooveturnR2))-CKpMgrooveturnR2)])
rotate([270,0,((CKpMd7+CKpMd6+CKpMd5+CKpMd4)+(CKpMd7+CKpMd6+CKpMd5))-i])
cylinder($fn=CKpMcutcylRez,d=CKpMgrooveD,h=CKpMgrooveOD);
}
///3
for(i=[((CKpMd7+CKpMd6+CKpMd5+CKpMd4)+(0.1)):(0.2):((CKpMd7+CKpMd6+CKpMd5+CKpMd4+CKpMd3)-(0.1))]){
hull(){
//even
translate([0,0,(CKpMgrooveD/2)])
rotate([270,0,i-(0.1)])
cylinder($fn=CKpMcutcylRez,d=CKpMgrooveD,h=CKpMgrooveOD);
//even
translate([0,0,(CKpMgrooveD/2)])
rotate([270,0,i])
cylinder($fn=CKpMcutcylRez,d=CKpMgrooveD,h=CKpMgrooveOD);
}//end hull 1
hull(){
//even
translate([0,0,(CKpMgrooveD/2)])
rotate([270,0,i])
cylinder($fn=CKpMcutcylRez,d=CKpMgrooveD,h=CKpMgrooveOD);
//odd
translate([0,0,(CKpMgrooveD/2)])
rotate([270,0,i+(0.1)])
cylinder($fn=CKpMcutcylRez,d=CKpMgrooveD,h=CKpMgrooveOD);
}//end hull 2
}//end fors
//2
for(i=[(CKpMd7+CKpMd6+CKpMd5+CKpMd4+CKpMd3)+(0.1):(0.2):(CKpMd7+CKpMd6+CKpMd5+CKpMd4+CKpMd3+CKpMd2)-(0.1)]){
hull(){
//even
translate([0,0,(CKpMgrooveD/2)-(CKpMgrooveturnR2*cos(asin(((i-(CKpMd7+CKpMd6+CKpMd5+CKpMd4+CKpMd3)-(0.1))*(PI*CKpMID)/360)/CKpMgrooveturnR2))-CKpMgrooveturnR2)])
rotate([270,0,i-(0.1)])
cylinder($fn=CKpMcutcylRez,d=CKpMgrooveD,h=CKpMgrooveOD);
//even
translate([0,0,(CKpMgrooveD/2)-(CKpMgrooveturnR2*cos(asin(((i-(CKpMd7+CKpMd6+CKpMd5+CKpMd4+CKpMd3))*(PI*CKpMID)/360)/CKpMgrooveturnR2))-CKpMgrooveturnR2)])
rotate([270,0,i])
cylinder($fn=CKpMcutcylRez,d=CKpMgrooveD,h=CKpMgrooveOD);
}//end hull 1
hull(){
//even
translate([0,0,(CKpMgrooveD/2)-(CKpMgrooveturnR2*cos(asin(((i-(CKpMd7+CKpMd6+CKpMd5+CKpMd4+CKpMd3))*(PI*CKpMID)/360)/CKpMgrooveturnR2))-CKpMgrooveturnR2)])
rotate([270,0,i])
cylinder($fn=CKpMcutcylRez,d=CKpMgrooveD,h=CKpMgrooveOD);
//odd
translate([0,0,(CKpMgrooveD/2)-(CKpMgrooveturnR2*cos(asin(((i-(CKpMd7+CKpMd6+CKpMd5+CKpMd4+CKpMd3)+(0.1))*(PI*CKpMID)/360)/CKpMgrooveturnR2))-CKpMgrooveturnR2)])
rotate([270,0,i+(0.1)])
cylinder($fn=CKpMcutcylRez,d=CKpMgrooveD,h=CKpMgrooveOD);
}//end hull 2
}//end fors
difference(){
for(i=[(CKpMd7+CKpMd6+CKpMd5+CKpMd4+CKpMd3)+(0.1):(0.2):(CKpMd7+CKpMd6+CKpMd5+CKpMd4+CKpMd3+CKpMd2)-(0.1)]){
translate([0,0,0])
rotate([270,0,i])
cylinder($fn=CKpMcutcylRez,d=CKpMgrooveD,h=CKpMgrooveOD);
}
cylinder($fn=180,d=CKpMID, h=pMH);
}
//1
hull(){
difference(){
for(i=[(CKpMd7+CKpMd6+CKpMd5+CKpMd4+CKpMd3+CKpMd2)+(0.1):(0.2):(CKpMd7+CKpMd6+CKpMd5+CKpMd4+CKpMd3+CKpMd2+CKpMd1+1)-(0.1)]){
translate([0,0,((CKpMgrooveD/2)+((sin(CKpMcutA)*CKpMgrooveturnR2)*360/(PI*CKpMID)))+((tan(CKpMcutA)*(i-(CKpMd7+CKpMd6+CKpMd5+CKpMd4+CKpMd3+CKpMd2-0.0))*mi))])
rotate([270,0,i])
cylinder($fn=CKpMcutcylRez,d=CKpMgrooveD,h=CKpMgrooveOD);
}
cylinder($fn=180,d=CKpMID, h=pMH);
} //end diff
difference(){
for(i=[(CKpMd7+CKpMd6+CKpMd5+CKpMd4+CKpMd3+CKpMd2)+(0.1):(0.2):(CKpMd7+CKpMd6+CKpMd5+CKpMd4+CKpMd3+CKpMd2+CKpMd1)-(0.1)]){
translate([0,0,0])
rotate([270,0,i])
cylinder($fn=CKpMcutcylRez,d=CKpMgrooveD,h=CKpMgrooveOD);
}
cylinder($fn=180,d=CKpMID, h=pMH);
} //end difference
} //end hull
///////////////////////////
} //end needlepathLEFT module
2D Cuts
- Parts to be cut out using a CNC machine
CKc2.scad
- rotating plate with gears
- need to calculate teeth per distance around outer diameter
include <CKvars.scad>;
// Copyright 2010 D1plo1d
// LGPL 2.1
t2t=6.858;
c2width=50;
c2gap=2;
c2OD=(c2width*2)+(c2gap*2)+p2OD+(p3wiggle*2)+(p3wallW*2);
c2ID=(c2gap*2)+p2OD+(p3wiggle*2)+(p3wallW*2);
c2teeth=((c2OD*PI)/t2t)-1;
c2dipitch=c2teeth/(c2OD*PI);
gear(c2teeth,circular_pitch=false,diametral_pitch=c2dipitch,pressure_angle=87, clearance=0.01);
//test_involute_curve();
//test_gears();
//demo_3d_gears();
// Geometry Sources:
// http://www.cartertools.com/involute.html
// gears.py (inkscape extension: /usr/share/inkscape/extensions/gears.py)
// Usage:
// Diametral pitch: Number of teeth per unit length.
// Circular pitch: Length of the arc from one tooth to the next
// Clearance: Radial distance between top of tooth on one gear to bottom of gap on another.
module gear(number_of_teeth,
circular_pitch=false, diametral_pitch=false,
pressure_angle=20, clearance = 0)
{
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;
// Base Circle
base_diameter = pitch_diameter*cos(pressure_angle);
base_radius = base_diameter/2;
// 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;
outer_diameter = outer_radius*2;
// 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;
root_diameter = root_radius * 2;
half_thick_angle = 360 / (4 * number_of_teeth);
difference()
{
union()
{
rotate(half_thick_angle) circle($fn=number_of_teeth*2, r=root_radius*1.001);
for (i= [1:number_of_teeth])
//for (i = [0])
{
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);
}
}
}
projection(cut = true) //use projection to create 2D
{
cylinder(d=c2ID,h=100);
}
}
}
module involute_gear_tooth(
pitch_radius,
root_radius,
base_radius,
outer_radius,
half_thick_angle
)
{
pitch_to_base_angle = involute_intersect_angle( base_radius, pitch_radius );
outer_to_base_angle = involute_intersect_angle( base_radius, outer_radius );
base1 = 0 - pitch_to_base_angle - half_thick_angle;
pitch1 = 0 - half_thick_angle;
outer1 = outer_to_base_angle - pitch_to_base_angle - half_thick_angle;
b1 = polar_to_cartesian([ base1, base_radius ]);
p1 = polar_to_cartesian([ pitch1, pitch_radius ]);
o1 = polar_to_cartesian([ outer1, outer_radius ]);
b2 = polar_to_cartesian([ -base1, base_radius ]);
p2 = polar_to_cartesian([ -pitch1, pitch_radius ]);
o2 = polar_to_cartesian([ -outer1, outer_radius ]);
// ( root_radius > base_radius variables )
pitch_to_root_angle = pitch_to_base_angle - involute_intersect_angle(base_radius, root_radius );
root1 = pitch1 - pitch_to_root_angle;
root2 = -pitch1 + pitch_to_root_angle;
r1_t = polar_to_cartesian([ root1, root_radius ]);
r2_t = polar_to_cartesian([ -root1, root_radius ]);
// ( else )
r1_f = polar_to_cartesian([ base1, root_radius ]);
r2_f = polar_to_cartesian([ -base1, root_radius ]);
if (root_radius > base_radius)
{
//echo("true");
polygon( points = [
r1_t,p1,o1,o2,p2,r2_t
], convexity = 3);
}
else
{
polygon( points = [
r1_f, b1,p1,o1,o2,p2,b2,r2_f
], convexity = 3);
}
}
// 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);
// Polar coord [angle, radius] to cartesian coord [x,y]
function polar_to_cartesian(polar) = [
polar[1]*cos(polar[0]),
polar[1]*sin(polar[0])
];
// Test Cases
//===============
module test_gears()
{
gear(number_of_teeth=51,circular_pitch=200);
translate([0, 50])gear(number_of_teeth=17,circular_pitch=200);
translate([-50,0]) gear(number_of_teeth=17,diametral_pitch=1);
}
module demo_3d_gears()
{
//double helical gear
translate([50,0])
{
linear_extrude(height = 10, center = true, convexity = 10, twist = -45)
gear(number_of_teeth=17,diametral_pitch=1);
translate([0,0,10])
rotate([0,180,180/17])
linear_extrude(height = 10, center = true, convexity = 10, twist = 45)
gear(number_of_teeth=17,diametral_pitch=1);
}
//spur gear
translate([0,-50]) linear_extrude(height = 10, center = true, convexity = 10, twist = 0)
gear(number_of_teeth=17,diametral_pitch=1);
}
module test_involute_curve()
{
for (i=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15])
{
translate(polar_to_cartesian([involute_intersect_angle( 0.1,i) , i ])) circle($fn=15, r=0.5);
}
}
To Do
- upper plate - mountain holder
- gear plate tooth calculations
- table plate w/nema etc
- weight holder plate
- small bearing holder
- big bearing holder
- Z bearing holder
- plate connector - i think this was done already, find?
- outerConnector
- CKp4 yard holder change dimensions based on needle layout
- update mountain for larger OD's. need to up rezolution
- create 3D printed electronics box?
- yard stick holder etc
- tensioner etc
See Also
- Open Source Textile Construction Set
- Open Source Circular Knitting Machine
- CircularKnitic Parametric