diff --git a/assets/stls/stapler/stapler_assembler_substrate2(1).STL b/assets/stls/stapler/stapler_assembler_substrate2(1).STL deleted file mode 100644 index bde749e6e0c31d75568da505286fe2fb76034cd5..0000000000000000000000000000000000000000 Binary files a/assets/stls/stapler/stapler_assembler_substrate2(1).STL and /dev/null differ diff --git a/assets/stls/stapler/substrate.stl b/assets/stls/stapler/substrate.stl index bde749e6e0c31d75568da505286fe2fb76034cd5..5427cd67663a32d98b47a973b6cdebcca9496b87 100644 Binary files a/assets/stls/stapler/substrate.stl and b/assets/stls/stapler/substrate.stl differ diff --git a/js/cam/assemblers/DualStaplerAssembler.js b/js/cam/assemblers/DualStaplerAssembler.js index 918176f3bd6fe0db66f269cf4fbb268504ae14e7..9f502b119decb7cf656e2229dee875f7902b9eb1 100644 --- a/js/cam/assemblers/DualStaplerAssembler.js +++ b/js/cam/assemblers/DualStaplerAssembler.js @@ -7,13 +7,13 @@ function DualStaplerAssembler(){ } DualStaplerAssembler.prototype = Object.create(StaplerAssembler.prototype); -StaplerAssembler.prototype._loadSTls = function(doAdd){ +DualStaplerAssembler.prototype._loadSTls = function(doAdd){ function geometryScale(geometry){ - geometry.applyMatrix(new THREE.Matrix4().makeRotationX(Math.PI/2)); - geometry.applyMatrix(new THREE.Matrix4().makeTranslation(0, 0, -4.3112)); +// geometry.applyMatrix(new THREE.Matrix4().makeRotationX(Math.PI/2)); +// geometry.applyMatrix(new THREE.Matrix4().makeTranslation(0, 0, -4.3112)); var unitScale = 20; - geometry.applyMatrix(new THREE.Matrix4().makeScale(unitScale, unitScale, unitScale)); +// geometry.applyMatrix(new THREE.Matrix4().makeScale(unitScale, unitScale, unitScale)); return geometry; } diff --git a/js/cam/assemblers/StaplerAssembler.js b/js/cam/assemblers/StaplerAssembler.js index c3cc822e57738331bb2b26a8ccd7583ab085824c..40239eee83a464598f0aa5bb443ab8538ab8dad2 100644 --- a/js/cam/assemblers/StaplerAssembler.js +++ b/js/cam/assemblers/StaplerAssembler.js @@ -25,9 +25,12 @@ StaplerAssembler.prototype._getTotalNumMeshes = function(){ StaplerAssembler.prototype._loadSTls = function(doAdd){ function geometryScale(geometry){ + geometry.applyMatrix(new THREE.Matrix4().makeTranslation(0.125, -2.3883, 1.0348)); + geometry.applyMatrix(new THREE.Matrix4().makeTranslation(0, 0.0625, -0.025)); + geometry.applyMatrix(new THREE.Matrix4().makeRotationX(Math.PI/2)); + var unitScale = 20; geometry.applyMatrix(new THREE.Matrix4().makeScale(unitScale, unitScale, unitScale)); - geometry.applyMatrix(new THREE.Matrix4().makeRotationX(Math.PI/2)); return geometry; } @@ -45,6 +48,8 @@ StaplerAssembler.prototype._loadSTls = function(doAdd){ doAdd(geometryScale(geometry), "xAxis"); }); loader.load("assets/stls/stapler/substrate.stl", function(geometry){ + geometry.applyMatrix(new THREE.Matrix4().makeRotationY(Math.PI/2)); + geometry.applyMatrix(new THREE.Matrix4().makeTranslation(0, 1.8545, -1.2598)); doAdd(geometryScale(geometry), "substrate"); }); }; \ No newline at end of file diff --git a/js/cells/DMACell.js b/js/cells/DMACell.js index 5e6f8db50172036b36e46a7cfb3b76e01c406c80..d375a309aaf9fedb6629881981d53c56d72bf2c4 100644 --- a/js/cells/DMACell.js +++ b/js/cells/DMACell.js @@ -141,6 +141,7 @@ DMACell.prototype.setMode = function(mode){ }; DMACell.prototype.getPosition = function(){ + if (this.superCell && this.indices) return globals.lattice.getPositionForIndex(this.indices); return this.object3D.position.clone(); }; diff --git a/js/cells/supercells/GIKSuperCell.js b/js/cells/supercells/GIKSuperCell.js index 222e2976e4a5bf3cf31934b3d9f4e9445f113015..fc9190f32248fed6601994809c613b6aa2980de2 100644 --- a/js/cells/supercells/GIKSuperCell.js +++ b/js/cells/supercells/GIKSuperCell.js @@ -45,7 +45,7 @@ GIKSuperCell = function(length, range, cells){ self.addChildCell(cell.setSuperCell(self, index)); }); if (this.indices) globals.three.sceneAdd(this.object3D, "supercell"); -// else (this.hide()); + else (this.hide()); this.setMode(); }; diff --git a/js/menus/NavViewMenu.js b/js/menus/NavViewMenu.js index 92e396e992d7d263d117e77da176684aa69a3415..9ed889fd729cdf1069a3059ac986dde53fb376d8 100644 --- a/js/menus/NavViewMenu.js +++ b/js/menus/NavViewMenu.js @@ -58,6 +58,7 @@ NavViewMenu = Backbone.View.extend({ <li><a class="appState boolProperty" data-property="basePlaneIsVisible" href="#">BasePlane</a></li>\ <li><a class="appState boolProperty" data-property="highlighterIsVisible" href="#">Hover Tool</a></li>\ <li class="divider"></li>\ + <li><a class="appState boolProperty" data-property="axesAreVisible" href="#">Axes</a></li>\ <li><a id="reset3DView" href="#">Reset 3D Navigation</a></li>\ ') diff --git a/js/models/AppState.js b/js/models/AppState.js index 1f28c18c78470f714e1c1baaf13bc3aa6e10834d..7822bc572ee36b316785e06cec5c53641deedeb3 100644 --- a/js/models/AppState.js +++ b/js/models/AppState.js @@ -23,6 +23,7 @@ AppState = Backbone.Model.extend({ basePlaneIsVisible:true, highlighterIsVisible:true, + axesAreVisible: false, //key bindings shift: false,