diff --git a/js/fea/DmaCellOcta.js b/js/fea/DmaCellOcta.js index 7b7194ea017d4cc27f7cd7342ed93037353e1be8..39a9e44d7409574353bafa4011d7d3b506fcf48a 100644 --- a/js/fea/DmaCellOcta.js +++ b/js/fea/DmaCellOcta.js @@ -76,10 +76,6 @@ DMAFreeFormOctaCell.prototype._doMeshTransformations = function(mesh){ mesh.rotation.set(eulerRot.x, eulerRot.y, eulerRot.z); }; -DMAFreeFormOctaCell.prototype.getType = function(){ - return "octa"; -}; - DMAFreeFormOctaCell.prototype.calcHighlighterPosition = function(face){ var direction = face.normal.clone(); direction.applyQuaternion(this.cellMesh.quaternion); @@ -93,6 +89,10 @@ DMAFreeFormOctaCell.prototype.calcHighlighterPosition = function(face){ return {index: _.clone(this.indices), direction:direction, position:position}; }; +DMAFreeFormOctaCell.prototype.getType = function(){ + return "octa"; +}; + DMAFreeFormOctaCell.prototype.zScale = function(scale){ if (!scale) scale = dmaGlobals.lattice.get("scale"); return 2*scale/Math.sqrt(6); diff --git a/js/fea/DmaCellTetra.js b/js/fea/DmaCellTetra.js index 16d830f4b4520d00ff9f2c2913d24fb01ec28e8f..3d18272cf84ecf046f8a41c145fdd49e852533c2 100644 --- a/js/fea/DmaCellTetra.js +++ b/js/fea/DmaCellTetra.js @@ -43,21 +43,6 @@ DMATetraEdgeCell.prototype = Object.create(DMATetraFaceCell.prototype); DMATetraEdgeCell.prototype._doMeshTransformations = function(){}; -DMATetraEdgeCell.prototype.calcHighlighterPosition = function(face){ - - //todo finish this - var direction = face.normal; - if (face.normal.z<0.99) direction = null;//only highlight horizontal faces - var index = _.clone(this.indices); - index.z = Math.floor(index.z/2); - index.x = Math.floor(index.x/3); - index.y = Math.floor(index.y/2); - var position = dmaGlobals.lattice.getInvCellPositionForIndex(index); - position.z += dmaGlobals.lattice.zScale(); - return {index: _.clone(this.indices), direction:direction, position:position}; -}; - - /////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////FREEFORM CONNECTED///////////////////////////////////////////////////// @@ -77,10 +62,6 @@ DMAFreeFormTetraCell.prototype._buildCellMesh = function(){//abstract mesh repre return this._superBuildCellMesh(unitCellGeo2); }; -DMAFreeFormTetraCell.prototype.getType = function(){ - return "tetra"; -}; - DMAFreeFormTetraCell.prototype._doMeshTransformations = function(mesh){ var direction = this.parentDirection.clone(); var zAxis = new THREE.Vector3(0,0,1); @@ -112,6 +93,10 @@ DMAFreeFormTetraCell.prototype.calcHighlighterPosition = function(face){ return {index: _.clone(this.indices), direction:direction, position:position}; }; +DMAFreeFormTetraCell.prototype.getType = function(){ + return "tetra"; +}; + DMAFreeFormTetraCell.prototype.zScale = function(scale){ if (!scale) scale = dmaGlobals.lattice.get("scale"); return 2*scale/Math.sqrt(24);