From 2016d05d3ece2d709f2f94062057045938e14938 Mon Sep 17 00:00:00 2001 From: Amanda Ghassaei <amandaghassaei@gmail.com> Date: Tue, 10 Mar 2015 03:21:47 -0400 Subject: [PATCH] remove zscale from cells now that inverse is not a thing --- js/fea/DmaCellOcta.js | 9 ++------- js/fea/DmaCellTetra.js | 10 +++++----- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/js/fea/DmaCellOcta.js b/js/fea/DmaCellOcta.js index 7ded37a9..7671d905 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 79a92dae..d3bbee95 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); +//}; -- GitLab