diff --git a/js/fea/DmaCellOcta.js b/js/fea/DmaCellOcta.js index 7ded37a98843e32a793d1ff83bc8bec978796dab..7671d90578b5cd847c81b0bb7290d34a450e319d 100644 --- a/js/fea/DmaCellOcta.js +++ b/js/fea/DmaCellOcta.js @@ -81,7 +81,7 @@ DMAFreeFormOctaCell.prototype.calcHighlighterPosition = function(face){ direction.applyQuaternion(this.cellMesh.quaternion); var position = this.getPosition(); - var zScale = this.zScale(); + var zScale = dmaGlobals.lattice.zScale(); position.x += direction.x*zScale/2; position.y += direction.y*zScale/2; position.z += direction.z*zScale/2; @@ -101,11 +101,6 @@ DMAFreeFormOctaCell.prototype.getType = function(){ return "octa"; }; -DMAFreeFormOctaCell.prototype.zScale = function(scale){ - if (!scale) scale = dmaGlobals.lattice.get("scale"); - return 2*scale/Math.sqrt(6); -}; - /////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////EDGE CONNECTED///////////////////////////////////////////////////////// @@ -124,7 +119,7 @@ DMAEdgeOctaCell.prototype.calcHighlighterPosition = function(face){ direction.applyQuaternion(this.cellMesh.quaternion); var position = this.getPosition(); - var zScale = this.zScale(); + var zScale = dmaGlobals.lattice.zScale(); position.x += direction.x*zScale/2; position.y += direction.y*zScale/2; position.z += direction.z*zScale/2; diff --git a/js/fea/DmaCellTetra.js b/js/fea/DmaCellTetra.js index 79a92daeafc8d813782764698fce73687b90bda3..d3bbee9527e653be3e8e8e34094f81265b961fb1 100644 --- a/js/fea/DmaCellTetra.js +++ b/js/fea/DmaCellTetra.js @@ -85,7 +85,7 @@ DMAFreeFormTetraCell.prototype.calcHighlighterPosition = function(face){ direction.applyQuaternion(this.cellMesh.quaternion); var position = this.getPosition(); - var zScale = this.zScale(); + var zScale = dmaGlobals.lattice.zScale(); position.x += direction.x*zScale/2; position.y += direction.y*zScale/2; position.z += direction.z*zScale/2; @@ -97,9 +97,9 @@ DMAFreeFormTetraCell.prototype.getType = function(){ return "tetra"; }; -DMAFreeFormTetraCell.prototype.zScale = function(scale){ - if (!scale) scale = dmaGlobals.lattice.get("scale"); - return 2*scale/Math.sqrt(24); -}; +//DMAFreeFormTetraCell.prototype.zScale = function(scale){ +// if (!scale) scale = dmaGlobals.lattice.get("scale"); +// return 2*scale/Math.sqrt(24); +//};