update cnc tool tips. increment tool # on new tools more intelligently
This commit is contained in:
parent
670c0c7822
commit
a0e1efca1b
2 changed files with 12 additions and 9 deletions
|
|
@ -43,7 +43,8 @@ var gs_kiri_init = exports;
|
|||
js2o = API.js2o,
|
||||
o2js = API.o2js,
|
||||
selectedTool = null,
|
||||
editTools = null;
|
||||
editTools = null,
|
||||
maxTool = 0;
|
||||
|
||||
function settings() {
|
||||
return API.conf.get();
|
||||
|
|
@ -1132,7 +1133,9 @@ var gs_kiri_init = exports;
|
|||
|
||||
function renderTools() {
|
||||
UI.toolSelect.innerHTML = '';
|
||||
maxTool = 0;
|
||||
editTools.forEach(function(tool, index) {
|
||||
maxTool = Math.max(maxTool, tool.number);
|
||||
tool.order = index;
|
||||
let opt = DOC.createElement('option');
|
||||
opt.appendChild(DOC.createTextNode(tool.name));
|
||||
|
|
@ -1279,7 +1282,7 @@ var gs_kiri_init = exports;
|
|||
UI.toolAdd.onclick = function() {
|
||||
editTools.push({
|
||||
id: Date.now(),
|
||||
number: editTools.length,
|
||||
number: maxTool + 1,
|
||||
name: "new",
|
||||
type: "endmill",
|
||||
shaft_diam: 0.25,
|
||||
|
|
|
|||
|
|
@ -122,18 +122,18 @@
|
|||
<option value="tapermill">taper</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="flow-row"><label>name</label><input id="tool-name" size=8></input></div>
|
||||
<div class="flow-row"><label>tool #</label><input id="tool-num" size=5></input></div>
|
||||
<div class="flow-row"><label>name</label><input id="tool-name" size="15"></input></div>
|
||||
<div class="flow-row" title="tool number to use
in gcode commands"><label>tool #</label><input id="tool-num" size="7"></input></div>
|
||||
<div class="flow-row"><label>metric</label><input id="tool-metric" type="checkbox"></input></div>
|
||||
<div class="grouphead">shaft</div>
|
||||
<div class="flow-row" title="shaft diameter"><label>diameter</label><input id="tool-sdiam" size=5></input></div>
|
||||
<div class="flow-row" title="shaft length"><label>length</label><input id="tool-slen" size=5></input></div>
|
||||
<div class="flow-row" title="shaft diameter in inches
unless metric is checked
then in millimeters"><label>diameter</label><input id="tool-sdiam" size="7"></input></div>
|
||||
<div class="flow-row" title="shaft length in inches
unless metric is checked
then in millimeters"><label>length</label><input id="tool-slen" size="7"></input></div>
|
||||
<div class="grouphead">flute</div>
|
||||
<div class="flow-row" title="flute diameter"><label>diameter</label><input id="tool-fdiam" size=5></input></div>
|
||||
<div class="flow-row" title="flute length"><label>length</label><input id="tool-flen" size=5></input></div>
|
||||
<div class="flow-row" title="flute diameter in inches
unless metric is checked
then in millimeters"><label>diameter</label><input id="tool-fdiam" size="7"></input></div>
|
||||
<div class="flow-row" title="flute length in inches
unless metric is checked
then in millimeters"><label>length</label><input id="tool-flen" size="7"></input></div>
|
||||
<div class="grouphead">taper</div>
|
||||
<!-- <div class="flow-row" title="taper angle"><label>angle</label><input id="tool-tangle" size=5></input></div> -->
|
||||
<div class="flow-row" title="tip width"><label>tip</label><input id="tool-ttip" size=5></input></div>
|
||||
<div class="flow-row" title="tip width in inches
unless metric is checked
then in millimeters"><label>tip</label><input id="tool-ttip" size="7"></input></div>
|
||||
</div>
|
||||
<div id="tool-view" class="flow-col"></div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in a new issue