diff --git a/css/main.css b/css/main.css index d79cb8f33f9236b24fdfc0d65d3df619e8a02a6a..81c6b8ef99c0647a7677e7e80563dac23826f690 100644 --- a/css/main.css +++ b/css/main.css @@ -216,7 +216,7 @@ hr { } input.intInput, input.floatInput{ - width:21%; + width:20%; display: inline; padding: 8px 8px; } diff --git a/js/cells/DMACell.js b/js/cells/DMACell.js index a73f09d5b779f75ceb22fba079dd838f8cb4f744..d0169cc08e16a7847eb3064c4f11511dc03f0d09 100644 --- a/js/cells/DMACell.js +++ b/js/cells/DMACell.js @@ -316,7 +316,7 @@ define(['underscore', 'three', 'threeModel', 'lattice', 'appState', 'globals', ' if (child.name == "object3D") return; child.visible = visible && (child.name == mode); }); - self.setWireframeVisibility(!self.isTransparent, mode); + self.setWireframeVisibility(!self.isTransparent && visible, mode); if (callback) { callback(); @@ -422,7 +422,9 @@ define(['underscore', 'three', 'threeModel', 'lattice', 'appState', 'globals', ' //parse DMACell.prototype.addToDenseArray = function(cellsArray, min){ var index = this.getAbsoluteIndex().sub(min); + if (cellsArray[index.x][index.y][index.z]) return true; cellsArray[index.x][index.y][index.z] = this; + return false; }; DMACell.prototype.removeFromDenseArray = function(cellsArray, min){ diff --git a/js/cells/supercells/DMASuperCell.js b/js/cells/supercells/DMASuperCell.js index 1347f297347b86b1446aec9d9e4479fca9099b6a..81881a8d03f204bd8625a1d4569ce873f2c48981 100644 --- a/js/cells/supercells/DMASuperCell.js +++ b/js/cells/supercells/DMASuperCell.js @@ -115,9 +115,11 @@ define(['underscore', 'three', 'threeModel', 'lattice', 'appState', 'cell'], //parse DMASuperCell.prototype.addToDenseArray = function(cellsArray, min){ + var overlap = false; this._loopCells(function(cell){ - if (cell) cell.addToDenseArray(cellsArray, min); + if (cell) overlap |= cell.addToDenseArray(cellsArray, min); }); + return overlap; }; diff --git a/js/lattice/Lattice.js b/js/lattice/Lattice.js index c8ecae1de80c01b9bd655eb10c57a236a9e6e7a7..7b498a4033dcecdabed699b361144155d435181a 100644 --- a/js/lattice/Lattice.js +++ b/js/lattice/Lattice.js @@ -17,6 +17,7 @@ define(['underscore', 'backbone', 'appState', 'globals', 'plist', 'three', 'thre partType: null, denseCellsMin: null, + overlapDetected: false, nodes: [], @@ -158,9 +159,11 @@ define(['underscore', 'backbone', 'appState', 'globals', 'plist', 'three', 'thre } var min = this.get("cellsMin").sub(bounds.min); + var self = this; this._loopCells(this.sparseCells, function(cell){ if (!cell) return; - cell.addToDenseArray(cells, min); + var overlap = cell.addToDenseArray(cells, min); + if (overlap) self.set("overlapDetected", true); }); this.cells = cells; diff --git a/js/main.js b/js/main.js index d5db5721501d184a6e832f1972b636a2602441c4..025df6a3e152b2691ac07b8ea63edcd849b5db8e 100644 --- a/js/main.js +++ b/js/main.js @@ -155,7 +155,7 @@ require.config({ //electronic sim eSim: 'simulation/electronics/eSim', - latticeESim: 'lattice/latticeESim', + latticeESim: 'lattice/LatticeESim', eSimCell: 'simulation/electronics/cells/eSimCell', eSimSuperCell: 'simulation/electronics/cells/eSimSuperCell', diff --git a/js/menus/ESetupMenuView.js b/js/menus/ESetupMenuView.js index 361820c25f551b8f9a7cbd0f55e8cf8f1780cf33..74f4ca89894a511d6d4b7e18fb9ec5d0e0c4fe08 100644 --- a/js/menus/ESetupMenuView.js +++ b/js/menus/ESetupMenuView.js @@ -32,7 +32,7 @@ define(['jquery', 'underscore', 'menuParent', 'plist', 'text!eSetupMenuTemplate' }, _makeTemplateJSON: function(){ - return _.extend(this.model.toJSON(), eSim.toJSON(), plist); + return _.extend(this.model.toJSON(), eSim.toJSON(), plist, {overlapDetected:lattice.get("overlapDetected")}); }, template: _.template(template) diff --git a/js/menus/templates/ESetupMenuView.html b/js/menus/templates/ESetupMenuView.html index 7bc4f4133c0bb581752f6463a2d1d4f3c986e589..741707ab7fd73efb3160bca3771088bd01b23b99 100644 --- a/js/menus/templates/ESetupMenuView.html +++ b/js/menus/templates/ESetupMenuView.html @@ -1,3 +1,6 @@ +<% if (overlapDetected) { %> + <div class="postWarning">Overlapping cells detected, check that hierarchical cells are not placed on top of one another. Simulation results may be inaccurate.</div> +<% } %> Simulation Type: <div class="btn-group"> <button data-toggle="dropdown" class="btn dropdown-toggle" type="button"><%= allMaterialClasses[materialClass] %><span class="caret"></span></button> diff --git a/js/menus/templates/EStaticMenuView.html b/js/menus/templates/EStaticMenuView.html index 3eade527c393eb44f332092728c57d15753430d2..3db74993137d281382650bfdd7e50aaa1cae1f78 100644 --- a/js/menus/templates/EStaticMenuView.html +++ b/js/menus/templates/EStaticMenuView.html @@ -1 +1,3 @@ -static calculations \ No newline at end of file +static calculations:<br/> +capacitance<br/> +inductance<br/> \ No newline at end of file