Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // New Geared Rail Design
- // aka 2020 rack + carriage
- // + "top" facing rack (mates to underside of carriage)
- // + 2x "outside" facing racks (mate to "insides" of carriage)
- // + Gears inside carriage (underside and insides)
- // + Compresive-tension / placement screws for matched gears (anti-backlash mechanism) (springs necessary?)
- // + Fasten-and-fit carriage body for ease of assembly / capture
- // Author: S.J.Gilpin
- // Thanks go to teepee from the OpenSCAD IRC community for their assistance below
- include <sjgilpin/2020profiles.scad>;
- length = 40;
- #translate ([0,10,-10]) rotate ([0,90,0]) linear_extrude (length+20) 2020tslot (width=20,height=20,cut=([1,2,3,4]));
- //translate ([10,0,0]) cube ([length,20,20]);
- translate ([10,0,0]) 2020rackrail(length=length);
- translate ([0,40,0]) 2020rack_carriage();
- module 2020rackrail (length=30) {
- // outline as polygon extrudable profile for outside racks, cut round holes from main block every 50 mm
- // correction: holes every (1.5707963 * 20 = 31.415926)mm, and (1.5376771 * 8 = 12.5663704)mm from the ends)
- // outline as separate polygon extrudable profile for top rack, predesign round holes from teeth every 50 mm
- // See hole spacing correction above
- // try to keep it basic for now, get fancy with stuff like herringbone much later
- // extend far end of polygon profile beyond rack profile where length exceeds multiples of 8th decimal of pi
- //sideracks_whole();
- linear_extrude (12.7) sideracks_whole();
- translate ([0,20,12.7]) {
- toprack_whole();
- };
- module sideracks_whole () {
- tiproot_south = [[0,0], [0.3315616,0], [0.6182283,0.6], [0.7960060,1], [1.3020953,2.138701], [1.3265373,2.161097], [1.3528373,2.181278], [1.3807963,2.19909], [1.4102013,2.214397], [1.4408283,2.227083], [1.4724451,2.237052], [1.50481,2.244227], [1.5376771,2.248554]]; // 13p
- roottip_south = [[0,2.25], [0.0331192,2.248554], [0.0659863,2.244227], [0.0983512,2.237052], [0.129968,2.227083], [0.160595,2.214397], [0.19,2.19909], [0.217959,2.181278], [0.244259,2.161097], [0.268701,2.138701], [0.7747903,1], [0.9525680,0.6], [1.2392347,0]]; // 13p
- rt_south_last = [[0,2.25], [0.0331192,2.248554], [0.0659863,2.244227], [0.0983512,2.237052], [0.129968,2.227083], [0.160595,2.214397], [0.19,2.19909], [0.217959,2.181278], [0.244259,2.161097], [0.268701,2.138701], [0.7747903,1], [0.952680,0.6], [1.2392347,0], [1.5707963,0]]; // 14p
- tiproot_north = [[0,2.25], [0.3315616,2.25], [0.6182283,1.65], [0.7960060,1.25], [1.3020953,0.111299], [1.3265373,0.088903], [1.3528373,0.068722], [1.3807963,0.05091], [1.4102013,0.035603], [1.4408283,0.022917], [1.4724451,0.012948], [1.50481,0.005773], [1.5376771,0.001446]]; // 13p
- roottip_north = [[0,0], [0.0331192,0.001446], [0.0659863,0.005773], [0.0983512,0.012948], [0.129968,0.022917], [0.160595,0.035603], [0.19,0.05091], [0.217959,0.068722], [0.244259,0.088903], [0.268701,0.111299], [0.7747903,1.25], [0.952680,1.65], [1.2392347,2.25]];
- rt_north_last = [[0,0], [0.0331192,0.001446], [0.0659863,0.005773], [0.0983512,0.012948], [0.129968,0.022917], [0.160595,0.035603], [0.19,0.05091], [0.217959,0.068722], [0.244259,0.088903], [0.268701,0.111299], [0.7747903,1.25], [0.952680,1.65], [1.2392347,2.25], [1.5707963,2.25]]; // 14p
- toothcount = floor(length/(1.5707963*2));
- echo("Tooth Count is:",toothcount);
- pathlen = 2*(toothcount*26)+8;
- swcorner = [0,2.6];
- secutin = [toothcount*(1.5707963*2),2.6];
- secorner = [length,2.6];
- necorner = [length,17.4];
- necutin = [toothcount*(1.5707963*2),17.4];
- nwcorner = [0,17.4];
- cut_tooth_south = [each [for (i=[0:12]) tiproot_south[i], for (i=[0:12]) [roottip_south[i][0]+1.5707963,roottip_south[i][1]]]];
- ct_south_last = [each [for (i=[0:12]) tiproot_south[i],for (i=[0:13]) [rt_south_last[i][0]+1.5707963,rt_south_last[i][1]]]];
- cut_rack_south = [each [for (a=[0:toothcount-2],b=[0:25]) [cut_tooth_south[b][0]+((1.5707963*2)*a),cut_tooth_south[b][1]],for (i=[0:26]) [ct_south_last[i][0]+((1.5707963*2)*(toothcount-1)),ct_south_last[i][1]]]];
- cut_tooth_north = [each [for (i=[12:-1:0]) roottip_north[i], for (i=[12:-1:0]) [tiproot_north[i][0]-1.5707963,tiproot_north[i][1]]]];
- ct_north_last = [each [for (i=[13:-1:0]) rt_north_last[i], for (i=[12:-1:0]) [tiproot_north[i][0]-1.5707963,tiproot_north[i][1]]]];
- cut_rack_north = [each [for (i=[0:26]) [ct_north_last[i][0]+((toothcount-0.5)*(1.5707963*2)),ct_north_last[i][1]+17.75],for (a=[1:toothcount-1],b=[0:25]) [cut_tooth_north[b][0]-((1.5707963*2)*a)+((toothcount-0.5)*(1.5707963*2)),cut_tooth_north[b][1]+17.75]]];
- southlen = len(cut_rack_south);
- northlen = len(cut_rack_north);
- bore_angle = [for (i=[0:19]) [2.55*cos(i*(360/20)),2.55*sin(i*(360/20))]]; // 9 mm hole
- borecount = floor((length-(1.5707963*20))/(1.5707963*20)+2);
- bore_xposition = [for (a=[0:borecount-1]) (a == 0) ? 12.5663704 : (a == (borecount-1)) ? (length-12.5663704) : 15.707963+(31.415926*a)];
- cut_bore_points = [for (a=[0:borecount-1],b=[0:19]) [bore_angle[b][0]+bore_xposition[a],bore_angle[b][1]+10]];
- bore_pathlen = 20*borecount;
- outerpath = [for (i=[0:pathlen-1]) i];
- borepath = [for (a=[0:borecount-1]) [for (b=[0:19]) pathlen+(a*20)+b]];
- //echo ("north tooth contains",cut_tooth_north);
- //echo ("north last contains",ct_north_last);
- //echo ("north rack contains",cut_rack_north);
- //echo ("bore_angle[i][0]",[for (i=[0:19]) bore_angle[i][0]]);
- //echo ("bore points contains",cut_bore_points);
- //echo ("bore angle contains",bore_angle);
- //echo ("bore x positions are",bore_xposition);
- //echo ("bore count is",borecount);
- //echo(pathlen);
- //echo("borepath contains",borepath);
- polygon (
- points = [
- swcorner,
- for (i=[0:southlen-1]) cut_rack_south[i],
- secutin,
- secorner,
- necorner,
- necutin,
- for (i=[0:northlen-1]) cut_rack_north[i],
- nwcorner,
- for (i=[0:bore_pathlen-1]) cut_bore_points[i]
- ],
- paths = [
- outerpath,(each[for (i=[borecount-1:-1:0]) borepath[i]])
- ]
- );
- };
- module toprack_whole () {
- tiproot = [[0,2.35], [0.3315616,2.35], [0.6182283,1.75], [0.7960060,1.35], [1.3020953,0.211299], [1.3265373,0.188903], [1.3528373,0.168722], [1.3807963,0.15091], [1.4102013,0.135603], [1.4408283,0.122917], [1.4724451,0.112948], [1.50481,0.105773], [1.5376771,0.101446]];
- roottip = [[0,0.1], [0.0331192,0.101446], [0.0659863,0.105773], [0.0983512,0.112948], [0.129968,0.122917], [0.160595,0.135603], [0.19,0.15091], [0.217959,0.168722], [0.244259,0.188903], [0.268701,0.211299], [0.7747903,1.35], [0.952680,1.75], [1.2392347,2.35]];
- roottip_last = [[0,0.1], [0.0331192,0.101446], [0.0659863,0.105773], [0.0983512,0.112948], [0.129968,0.122917], [0.160595,0.135603], [0.19,0.15091], [0.217959,0.168722], [0.244259,0.188903], [0.268701,0.211299], [0.7747903,1.35], [0.952680,1.75], [1.2392347,2.35], [1.5707963,2.35]];
- toothcount = floor(length/(1.5707963*2));
- pathlen = (toothcount*26)+3;
- swcorner = [0,0];
- secorner = [toothcount*(1.5707963*2),0];
- cut_tooth = [each [for (i=[0:12]) tiproot[i], for (i=[0:12]) [roottip[i][0]+1.5707963,roottip[i][1]]]];
- cut_tooth_last = [each [for (i=[0:12]) tiproot[i], for (i=[0:13]) [roottip_last[i][0]+1.5707963,roottip_last[i][1]]]];
- cut_rack = [each [for (a=[0:toothcount-2],b=[0:25]) [cut_tooth[b][0]+((1.5707963*2)*a),cut_tooth[b][1]+4.95],for (i=[0:26]) [cut_tooth_last[i][0]+((1.5707963*2)*(toothcount-1)),cut_tooth_last[i][1]+4.95]]];
- borecount = floor((length-(1.5707963*20))/(1.5707963*20)+2);
- bore_xposition = [for (a=[0:borecount-1]) (a == 0) ? 12.5663704 : (a == (borecount-1)) ? (length-12.5663704) : 15.707963+(31.415926*a)];
- outerpath = [for (i=[0:pathlen-1]) i];
- difference() {
- rotate ([90,0,0]) linear_extrude (20) polygon (
- points = [
- swcorner,
- for (i=[0:pathlen-3]) cut_rack[i],
- secorner
- ]
- );
- for (a=[0:borecount-1]) translate ([bore_xposition[a],-10,-1]) cylinder (h=10,r=4.5);
- };
- //translate ([12.5663704,-10,-2.25]) color ("green") cylinder (h=5,d=8.72);
- };
- };
- module 2020rack_carriage () {
- // multiple parts to easily assemble for gear housing purpose
- // one stationary gear and one adjustable gear per sub-rack to allow anti-backlash pre-tension
- // four surface-mounting holes centered 32 mm from eachother on y and 36 to 50 mm on x
- mod1gear();
- module mod1gear () {
- tiproot = [[0,2.35], [0.3315616,2.35], [0.6182283,1.75], [0.7960060,1.35], [1.3020953,0.211299], [1.3265373,0.188903], [1.3528373,0.168722], [1.3807963,0.15091], [1.4102013,0.135603], [1.4408283,0.122917], [1.4724451,0.112948], [1.50481,0.105773], [1.5376771,0.101446]];
- roottip = [[0,0.1], [0.0331192,0.101446], [0.0659863,0.105773], [0.0983512,0.112948], [0.129968,0.122917], [0.160595,0.135603], [0.19,0.15091], [0.217959,0.168722], [0.244259,0.188903], [0.268701,0.211299], [0.7747903,1.35], [0.952680,1.75], [1.2392347,2.35]];
- pitch_radius = 10;
- circumference = 2*3.1415926*pitch_radius;
- if ((circumference / 3.1415926) != (floor(circumference / 3.1415926))) {
- echo ("The gear is sized improperly for the tooth size. It currently fits",(circumference/3.1415926),"teeth.");
- echo ("For more teeth, consider changing the radius to",(ceil(circumference / 3.1415926)/2));
- echo ("Or for less teeth, consider",(floor(circumference / 3.1415926)/2));
- };
- tooth_count = circumference / 3.1415926;
- pathlen = tooth_count*26;
- cut_tooth = [each [for (i=[0:12]) tiproot[i], for (i=[0:12]) [roottip[i][0]+1.5707963,roottip[i][1]]]];
- //tooth_angle = [each [for (a=[0:tooth_count-1],b=[0:25]) [cut_tooth[b][0]+(pitch_radius*cos*(a*b*(360/pathlen))),cut_tooth[b][1]+(pitch_radius*sin*(a*b*(360/pathlen)))]]];
- tooth_angle = [each [for (a=[0:tooth_count-1],b=[0:25]) [(cut_tooth[b][0]+pitch_radius)*cos*(a*b*(360/pathlen)),(cut_tooth[b][1]+pitch_radius)*sin*(a*b*(360/pathlen))]]];
- };
- };
- //linear_extrude (20) 2020tslot(width=40,height=40,cut=[1,2,3,4,5,6,7,8,9,10]);
- /* Rack Tooth Form Notes
- module = 1.0
- add. = 1.0
- ded. = 1.25
- pitch = pi x mod (3.1415926) OR (3.1415927)
- thick = pitch/2 (1.5707963)
- dist = pitch/2 (1.5707963)
- rootrad = 0.38 (measured WHERE? negMod?) (ends -45~45?)
- fillet height = max 0.6
- fillet width = max 0.02
- pa = 20 deg = 4/9 = 0.44 repeating
- central dedendum 1 = 0,0
- pitch = pi (3.1415926) OR (3.1415927)
- thick&dist = pi/2 (1.5707963)
- central addendum 1 = (pi/2,2.25) (1.5707963,2.25)
- root wedge:
- = 0deg [0,-0.38]
- = 5 [0.0331192,-0.0378554] // WRONG [0.0331192,-0.378554]
- = 10 [0.0659863,-0.374227]
- = 15 [0.0983512,-0.367052]
- = 20 [0.129968,-0.357083]
- = 25 [0.160595,-0.344397]
- = 30 [0.19,-0.32909]
- = 35 [0.217959,-0.311278]
- = 40 [0.244259,-0.291097]
- = 45 [0.268701,-0.268701]
- root wedge global:
- = 0deg [0,0]
- = 5 [0.0331192,0.3421446] // WRONG [0.0331192,0.001446]
- = 10 [0.0659863,0.005773]
- = 15 [0.0983512,0.012948]
- = 20 [0.129968,0.022917]
- = 25 [0.160595,0.035603]
- = 30 [0.19,0.05091]
- = 35 [0.217959,0.068722]
- = 40 [0.244259,0.088903]
- = 45 [0.268701,0.111299]
- tooth edge node at pitch line = (+0.55,+1.25)xModule above inters. pa&ded.
- inters. of pa&add. = (+1,+2.25)xModule avove inters. pa&ded.
- pa&ded = (0.21923477777777777777777777777778,0) shortened to (0.2192347,0) OR (0.2192348,0)
- pa&pitch = (0.7747902,1.25) OR (0.7747902,1.25)
- pa&add = (1.2192347,2.25) OR (1.2192348,2.25)
- tip fillet y = 1.65 = (0.952681,1.65)
- tip fillet x = 1.23.... = (1.2392347,2.25)
- root to tip:
- = 0deg [0,0]
- = 5 [0.0331192,0.3421446] // WRONG, see above ([0.0331192,0.001446])
- = 10 [0.0659863,0.005773]
- = 15 [0.0983512,0.012948]
- = 20 [0.129968,0.022917]
- = 25 [0.160595,0.035603]
- = 30 [0.19,0.05091]
- = 35 [0.217959,0.068722]
- = 40 [0.244259,0.088903]
- = 45 [0.268701,0.111299]
- = pa&p [0.2192347,1.25] // WRONG, see below ([0.7747903,1.25])
- = fily [0.952681,1.65] // WRONG, see below ([0.9525680,1.65])
- = filx [1.2392347,2.25]
- = tip [1.5707963,2.25]
- root to tip (incl., 14p):
- [0,0], [0.0331192,0.001446], [0.0659863,0.005773], [0.0983512,0.012948], [0.129968,0.022917], [0.160595,0.035603], [0.19,0.05091], [0.217959,0.068722], [0.244259,0.088903], [0.268701,0.111299], [0.7747903,1.25], [0.952680,1.65], [1.2392347,2.25], [1.5707963,2.25]
- root to tip (excl., 13p):
- [0,0], [0.0331192,0.001446], [0.0659863,0.005773], [0.0983512,0.012948], [0.129968,0.022917], [0.160595,0.035603], [0.19,0.05091], [0.217959,0.068722], [0.244259,0.088903], [0.268701,0.111299], [0.7747903,1.25], [0.952680,1.65], [1.2392347,2.25]
- pa&p = intersection of pressure angle and pitch line
- fily = tip fillet on y axis
- filx = tip fillet on x axis
- tip = tip center of tooth
- tip to root:
- = tip [0,2.25]
- = filx [0.3315616,2.25]
- = fily [0.6181153,1.65] // WRONG, correct it ([0.6182283,1.65])
- = pa&p [1.3515616,1.25] // WRONG, correct it ([0.7960060,1.25])
- = 45 [1.3020953,0.111299]
- = 40 [1.3265373,0.088903]
- = 35 [1.3528373,0.068722]
- = 30 [1.3807963,0.05091]
- = 25 [1.4102013,0.035603]
- = 20 [1.4408283,0.022917]
- = 15 [1.4724451,0.012948]
- = 10 [1.50481,0.005773]
- = 5 [1.5376771,0.3421446] // WRONG ([1.5376771,0.001446])
- = 0deg [1.5707963,0]
- tip to root (incl.):
- [0,2.25], [0.3315616,2.25], [0.6182283,1.65], [0.7960060,1.25], [1.3020953,0.111299], [1.3265373,0.088903], [1.3528373,0.068722], [1.3807963,0.05091], [1.4102013,0.035603], [1.4408283,0.022917], [1.4724451,0.012948], [1.50481,0.005773], [1.5376771,0.001446], [1.5707963,0]
- tip to root (excl.):
- [0,2.25], [0.3315616,2.25], [0.6182283,1.65], [0.7960060,1.25], [1.3020953,0.111299], [1.3265373,0.088903], [1.3528373,0.068722], [1.3807963,0.05091], [1.4102013,0.035603], [1.4408283,0.022917], [1.4724451,0.012948], [1.50481,0.005773], [1.5376771,0.001446]
- root to tip, inverted y:
- = 0deg [0,2.25]
- = 5 [0.0331192,1.9078554] // 2.248554
- = 10 [0.0659863,2.244227]
- = 15 [0.0983512,2.237052]
- = 20 [0.129968,2.227083]
- = 25 [0.160595,2.214397]
- = 30 [0.19,2.19909]
- = 35 [0.217959,2.181278]
- = 40 [0.244259,2.161097]
- = 45 [0.268701,2.138701]
- = pa&p [0.2192347,1] // 0.7747903,1
- = fily [0.952681,0.6] // 0.9525680,0.6
- = filx [1.2392347,0]
- = tip [1.5707963,0]
- root to tip, inverted y (incl.):
- [0,2.25], [0.0331192,2.248554], [0.0659863,2.244227], [0.0983512,2.237052], [0.129968,2.227083], [0.160595,2.214397], [0.19,2.19909], [0.217959,2.181278], [0.244259,2.161097], [0.268701,2.138701], [0.7747903,1], [0.952680,0.6], [1.2392347,0], [1.5707963,0]
- root to tip, inverted y (excl.):
- [0,2.25], [0.0331192,2.248554], [0.0659863,2.244227], [0.0983512,2.237052], [0.129968,2.227083], [0.160595,2.214397], [0.19,2.19909], [0.217959,2.181278], [0.244259,2.161097], [0.268701,2.138701], [0.7747903,1], [0.952680,0.6], [1.2392347,0]
- tip to root, inverted y:
- = tip [0,0]
- = filx [0.3315616,0]
- = fily [0.6181153,0.6] // 0.6182283,0.6
- = pa&p [1.3515616,1] // 0.7960060,1
- = 45 [1.3020953,2.138701]
- = 40 [1.3265373,2.161097]
- = 35 [1.3528373,2.181278]
- = 30 [1.3807963,2.19909]
- = 25 [1.4102013,2.214397]
- = 20 [1.4408283,2.227083]
- = 15 [1.4724451,2.237052]
- = 10 [1.50481,2.244227]
- = 5 [1.5376771,1.9078554] // 2.248554
- = 0deg [1.5707963,2.25]
- tip to root, inverted y (incl.):
- [0,0], [0.3315616,0], [0.6182283,0.6], [0.7960060,1], [1.3020953,2.138701], [1.3265373,2.161097], [1.3528373,2.181278], [1.3807963,2.19909], [1.4102013,2.214397], [1.4408283,2.227083], [1.4724451,2.237052], [1.50481,2.244227], [1.5376771,2.248554], [1.5707963,2.25]
- tip to root, inverted y (excl.):
- [0,0], [0.3315616,0], [0.6182283,0.6], [0.7960060,1], [1.3020953,2.138701], [1.3265373,2.161097], [1.3528373,2.181278], [1.3807963,2.19909], [1.4102013,2.214397], [1.4408283,2.227083], [1.4724451,2.237052], [1.50481,2.244227], [1.5376771,2.248554]
- Corrected data from above
- y-y1 = m (x-x1)
- m=(y-y1)/(x-x1)
- the y-intercept of the equation of a line in the point-slope form is: (0, y₁ - mx₁) or y₁ - mx₁
- y=mx+b (y=[slope]x+[y0])
- =9x-4y=1.9731128 OR 1.9731132
- y=mx+c (y=[slope]x+[x0])
- y0=-0.4932782 OR -0.4932783
- x0=0.2192347 OR 0.2192348
- slope (m) of 2.25 (20deg from vertical)
- [0.268701,0.111299] (45deg point 0.38 radius from 0,0)
- [0.7747903,1.25] OR [0.7747904,1.25]
- [0.9525680,1.65] OR [0.9525681,1.65]
- [1.2192347,2.25] OR [1.2192348,2.25]
- ([1.2392347,2.25] OR [1.2392347,2.25])
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement