diff --git a/js/cells/GIKCell.js b/js/cells/GIKCell.js index b62c2a582eb2a4a2eaa474a7541f985edcd5df28..bd4352ab235c3c6db024873adcd37ba50e660a39 100644 --- a/js/cells/GIKCell.js +++ b/js/cells/GIKCell.js @@ -33,5 +33,17 @@ define(['underscore', 'three', 'threeModel', 'lattice', 'appState', 'cubeCell'], } }; + //todo move this somewhere else + GIKCell.prototype.propagateConductorGroupNum = function(num){ + if (!this.isConductive()) return; + if (num === undefined) num = this._eSimConductorGroup; + var self = this; + this.superCell._loopCells(function(cell){ + if (cell == self) return; + if (cell) cell.setConductorGroupNum(num); + }); + CubeCell.prototype.propagateConductorGroupNum.call(this, num); + }; + return GIKCell; }); \ No newline at end of file diff --git a/js/lattice/Lattice.js b/js/lattice/Lattice.js index 78eac68fa9ecc9a3d0f011948a7db632fd848a99..46286d2ac006d1c3287f381531a329c81a542442 100644 --- a/js/lattice/Lattice.js +++ b/js/lattice/Lattice.js @@ -143,7 +143,6 @@ define(['underscore', 'backbone', 'appState', 'globals', 'plist', 'three', 'thre } var bounds = this.calculateBoundingBox(); - console.log(bounds); this.set("denseCellsMin", bounds.min.clone().add(this.get("cellsMin"))); var size = bounds.max.sub(bounds.min); diff --git a/js/lattice/LatticeBase.js b/js/lattice/LatticeBase.js index 2fd8bea6debd339ad82943f845e890d98c9305ce..88ce0c206e9cb5dfd9cc93c9bd7604499aa9cf04 100644 --- a/js/lattice/LatticeBase.js +++ b/js/lattice/LatticeBase.js @@ -215,7 +215,6 @@ define(['underscore', 'backbone', 'appState', 'globals', 'plist', 'three', 'thre if (element == -1) padding[key] = 1; }); subCellRange.add(padding); - console.log(subCellRange); dimMax.max(subCellRange); dimMin.min(subCellRange); } diff --git a/js/lattice/LatticeEsim.js b/js/lattice/LatticeEsim.js index 19b5c6b990f596876ad349579c8f499fcb876a0e..80061c6ef8ce337f52cc6b732df655a749562587 100644 --- a/js/lattice/LatticeEsim.js +++ b/js/lattice/LatticeEsim.js @@ -56,12 +56,13 @@ define(['lattice', 'appState', 'threeModel', 'eSim', 'eSimCell', 'eSimSuperCell' var xLength = this.cells.length; var yLength = this.cells[0].length; var zLength = this.cells[0][0].length; + if (index.z+1 < zLength) callback(this.cells[index.x][index.y][index.z+1]); + if (index.z-1 >= 0) callback(this.cells[index.x][index.y][index.z-1]); + if (this.get("connectionType") == "gik") return; if (index.x+1 < xLength) callback(this.cells[index.x+1][index.y][index.z]); if (index.x-1 >= 0) callback(this.cells[index.x-1][index.y][index.z]); if (index.y+1 < yLength) callback(this.cells[index.x][index.y+1][index.z]); if (index.y-1 >= 0) callback(this.cells[index.x][index.y-1][index.z]); - if (index.z+1 < zLength) callback(this.cells[index.x][index.y][index.z+1]); - if (index.z-1 >= 0) callback(this.cells[index.x][index.y][index.z-1]); } };