diff --git a/js/cam/Assembler.js b/js/cam/Assembler.js index adf2320bf7a9b6b80c2d9ffe96c43613d985fea3..f98c85896a8ad4032e679217114d588047434981 100644 --- a/js/cam/Assembler.js +++ b/js/cam/Assembler.js @@ -25,6 +25,7 @@ Assembler = Backbone.Model.extend({ stock: null, stockPosition: new THREE.Vector3(20,0,0),//in abs coordinates stockPositionRelative: true, + stockFixed: false,//stock is fixed position from origin multipleStockPositions: false, stockArraySize: {x:4, y:4}, stockSeparation: 2.78388, @@ -93,6 +94,7 @@ Assembler = Backbone.Model.extend({ } else if (machineName == "oneBitBot"){ this.set("machine", new OneBitBot()); this.set("camProcess", "gcode"); + this.set("stockFixed", true); } else console.warn("selected machine not recognized"); }, @@ -164,7 +166,7 @@ Assembler = Backbone.Model.extend({ _moveOrigin: function(){ var position = this.get("originPosition"); this.get("origin").position.set(position.x, position.y, position.z); - if (this.get("stockPositionRelative")) this._updateStockPosToOrigin(position); + if (this.get("stockFixed")) this._updateStockPosToOrigin(position); dmaGlobals.three.render(); if (this.get("machine").setMachinePosition) this.get("machine").setMachinePosition(); }, diff --git a/js/menus/CamMenuView.js b/js/menus/CamMenuView.js index d52545b0d5dae1782160bf8c1f3967d32c7cba53..01933cf39d124d66cde69f7f554b8cd86b7f81c1 100644 --- a/js/menus/CamMenuView.js +++ b/js/menus/CamMenuView.js @@ -176,6 +176,10 @@ CamMenuView = Backbone.View.extend({ <input id="stockPosRel" data-property="stockPositionRelative" type="checkbox" <% if (stockPositionRelative){ %> checked="checked"<% } %> value="" data-toggle="checkbox" class="custom-checkbox">\ <span class="icons"><span class="icon-unchecked"></span><span class="icon-checked"></span></span>\ Stock position relative to Origin</label>\ + <label class="checkbox" for="stockFixed">\ + <input id="stockFixed" data-property="stockFixed" type="checkbox" <% if (stockFixed){ %> checked="checked"<% } %> value="" data-toggle="checkbox" class="custom-checkbox">\ + <span class="icons"><span class="icon-unchecked"></span><span class="icon-checked"></span></span>\ + Fix stock to to Origin</label>\ <label class="checkbox" for="multipleStockPositions">\ <input id="multipleStockPositions" data-property="multipleStockPositions" type="checkbox" <% if (multipleStockPositions){ %> checked="checked"<% } %> value="" data-toggle="checkbox" class="custom-checkbox">\ <span class="icons"><span class="icon-unchecked"></span><span class="icon-checked"></span></span>\ diff --git a/js/threeViews/ThreeView.js b/js/threeViews/ThreeView.js index 82f58e1e17e93a1f00ae1d96b4e970ecb8bfd5ef..fd0b4a6f56b3f6243228306072930e3d34dd1f2c 100644 --- a/js/threeViews/ThreeView.js +++ b/js/threeViews/ThreeView.js @@ -86,7 +86,7 @@ ThreeView = Backbone.View.extend({ _mouseMoved: function(e){ - if (!dmaGlobals.appState.get("highlightMode")) return; + if (!dmaGlobals.appState.get("highlightMode") && !(dmaGlobals.appState.get("manualSelectOrigin"))) return; if (this.mouseIsDown && !this.controls.noRotate) {//in the middle of a camera move this.highlighter.setNothingHighlighted();