workshop:metalworking:lathe:star300
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| workshop:metalworking:lathe:star300 [2021/06/07 22:39] – yent | workshop:metalworking:lathe:star300 [2024/01/12 08:33] (current) – yent | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== Star 300 lathe ====== | ||
| + | Documentation : {{: | ||
| + | |||
| + | ===== Pitch settings finder ===== | ||
| + | |||
| + | < | ||
| + | <script type=" | ||
| + | document.addEventListener(" | ||
| + | var gear_combinations = { | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | }; | ||
| + | |||
| + | var levers = [ | ||
| + | {' | ||
| + | {' | ||
| + | {' | ||
| + | {' | ||
| + | ]; | ||
| + | |||
| + | var selectors = [gear_combinations].concat(levers); | ||
| + | |||
| + | var combine = function(sets) { | ||
| + | var selset = sets.shift(); | ||
| + | | ||
| + | var cbn = []; | ||
| + | if(sets.length) { | ||
| + | var sub = combine(sets); | ||
| + | for(var k in selset) | ||
| + | for(var i=0; i< | ||
| + | cbn.push({name: | ||
| + | | ||
| + | } else { | ||
| + | for(var k in selset) | ||
| + | cbn.push({name: | ||
| + | } | ||
| + | | ||
| + | return cbn; | ||
| + | }; | ||
| + | |||
| + | var combinations = combine(selectors); | ||
| + | combinations.sort(function(a, | ||
| + | if(a.pitch > b.pitch) return 1; | ||
| + | if(a.pitch < b.pitch) return -1; | ||
| + | return 0; | ||
| + | }); | ||
| + | for(var i=0; i< | ||
| + | combinations[i].name = combinations[i].name.replace(/ | ||
| + | combinations[i].pitch = combinations[i].pitch.toFixed(4); | ||
| + | } | ||
| + | |||
| + | var lookup = function(pitch /* mm */, combinations, | ||
| + | if(max_error === undefined) | ||
| + | max_error = 0.002; | ||
| + | | ||
| + | var results = []; | ||
| + | for(var i=0; i< | ||
| + | var error = Math.abs(pitch - combinations[i].pitch) / pitch; | ||
| + | if(error > max_error) continue; | ||
| + | results.push({name: | ||
| + | } | ||
| + | | ||
| + | results.sort(function(a, | ||
| + | var ga = a.name.split(' | ||
| + | var gb = b.name.split(' | ||
| + | if(ga > gb) return 1; | ||
| + | if(ga < gb) return -1; | ||
| + | if(a.error > b.error) return 1; | ||
| + | if(a.error < b.error) return -1; | ||
| + | return 0; | ||
| + | }); | ||
| + | | ||
| + | return results; | ||
| + | }; | ||
| + | | ||
| + | var output = jQuery('# | ||
| + | var say = function(msg) { | ||
| + | jQuery('< | ||
| + | }; | ||
| + | | ||
| + | jQuery('# | ||
| + | output.empty(); | ||
| + | | ||
| + | var pitch = parseFloat(jQuery('# | ||
| + | if(isNaN(pitch)) { | ||
| + | say(' | ||
| + | return; | ||
| + | } | ||
| + | | ||
| + | var unit = jQuery('# | ||
| + | if(!unit.match(/ | ||
| + | say(' | ||
| + | return; | ||
| + | } | ||
| + | | ||
| + | var accuracy = parseFloat(jQuery('# | ||
| + | if(isNaN(accuracy)) { | ||
| + | say(' | ||
| + | return; | ||
| + | } | ||
| + | | ||
| + | if(unit == ' | ||
| + | if(unit == ' | ||
| + | | ||
| + | accuracy /= 100; | ||
| + | | ||
| + | say(' | ||
| + | | ||
| + | var results = lookup(pitch, | ||
| + | if(!results.length) { | ||
| + | say(' | ||
| + | return; | ||
| + | } | ||
| + | | ||
| + | say(' | ||
| + | for(var i=0; i< | ||
| + | say(results[i].name + ' gives ' + results[i].pitch + 'mm pitch with ' + results[i].error + ' error' | ||
| + | } | ||
| + | }); | ||
| + | }); | ||
| + | </ | ||
| + | |||
| + | <table id=" | ||
| + | <tr> | ||
| + | <td> | ||
| + | Pitch | ||
| + | <input type=" | ||
| + | <select name=" | ||
| + | <option value=" | ||
| + | <option value=" | ||
| + | <option value=" | ||
| + | </ | ||
| + | </td> | ||
| + | <td> | ||
| + | Accuracy | ||
| + | <input type=" | ||
| + | </td> | ||
| + | <td> | ||
| + | < | ||
| + | </td> | ||
| + | </tr> | ||
| + | <tr> | ||
| + | <td colspan=" | ||
| + | </tr> | ||
| + | </ | ||
| + | |||
| + | </ | ||
| + | |||
| + | ===== Gearbox setup ===== | ||
| + | |||
| + | {{ : | ||