From 00ece1b46fc40eda3fe35325601b44e75233ed01 Mon Sep 17 00:00:00 2001
From: Amanda Ghassaei <amandaghassaei@gmail.com>
Date: Mon, 9 Mar 2015 00:45:33 -0400
Subject: [PATCH] removed squashed tetra

---
 js/fea/DmaCell.js           | 58 -------------------------------------
 js/menus/LatticeMenuView.js |  7 -----
 js/models/Lattice.js        |  2 --
 3 files changed, 67 deletions(-)

diff --git a/js/fea/DmaCell.js b/js/fea/DmaCell.js
index 77d893ca..b68dc549 100644
--- a/js/fea/DmaCell.js
+++ b/js/fea/DmaCell.js
@@ -381,64 +381,6 @@ DMACell.prototype.toJSON = function(){
     self.DMAFreeFormTetraCell = DMAFreeFormTetraCell;
 
 
-
-//    var unitCellGeo3 = new THREE.TetrahedronGeometry(Math.sqrt(3/8));
-//    unitCellGeo3.applyMatrix(new THREE.Matrix4().makeRotationZ(Math.PI/4));
-//    unitCellGeo3.applyMatrix(new THREE.Matrix4().makeRotationX((Math.PI-Math.atan(2*Math.sqrt(2)))/2));
-//    unitCellGeo3.applyMatrix(new THREE.Matrix4().makeScale(1,1,2/3));
-//
-//    function DMAFreeFormSquashedTetraCell(indices, scale, parentCellPos, parentCellQuat, direction, parentType){
-//        DMAFreeFormTetraCell.call(this, indices, scale, parentCellPos, parentCellQuat, direction, parentType);
-//    }
-//    DMAFreeFormSquashedTetraCell.prototype = Object.create(DMAFreeFormTetraCell.prototype);
-//
-//    DMAFreeFormSquashedTetraCell.prototype._buildCellMesh = function(){//abstract mesh representation of cell
-//        return this._superBuildCellMesh(unitCellGeo3);
-//    };
-//
-//    DMAFreeFormSquashedTetraCell.prototype._doMeshTransformations = function(mesh){
-//        var direction = this.parentDirection.clone();
-//        var zAxis = new THREE.Vector3(0,0,1);
-//        zAxis.applyQuaternion(this.parentQuaternion);
-//        var quaternion = new THREE.Quaternion().setFromUnitVectors(zAxis, direction);
-//        quaternion.multiply(this.parentQuaternion);
-//
-//        if (this.parentType == "octa" && direction.sub(zAxis).length() > 0.1){//only do this if connecting to octa
-//            var zRot = new THREE.Quaternion().setFromAxisAngle(this.parentDirection, Math.PI);
-//            zRot.multiply(quaternion);
-//            quaternion = zRot;
-//        }
-//
-//        var eulerRot = new THREE.Euler().setFromQuaternion(quaternion);
-//        mesh.rotation.set(eulerRot.x, eulerRot.y, eulerRot.z);
-//    };
-//
-//    DMAFreeFormTetraCell.prototype.calcHighlighterPosition = function(face){
-//
-//        var direction = face.normal.clone();
-//        direction.applyQuaternion(this.cellMesh.quaternion);
-//
-//        var position = this.getPosition();
-//        var zScale = this.zScale()*3/2;
-//        position.x += direction.x*zScale/2;
-//        position.y += direction.y*zScale/2;
-//        position.z += direction.z*zScale/2;
-//
-//        return {index: _.clone(this.indices), direction:direction, position:position};
-//    };
-//
-//    DMAFreeFormSquashedTetraCell.prototype.zScale = function(scale){
-//        if (!scale) scale = dmaGlobals.lattice.get("scale");
-//        return 2*scale/Math.sqrt(24)*2/3;
-//    };
-//
-//    DMAFreeFormSquashedTetraCell.prototype.getType = function(){
-//        return "squashedTetra";
-//    };
-//    self.DMAFreeFormSquashedTetraCell = DMAFreeFormSquashedTetraCell;
-
-
-
     function DMATetraEdgeCell(indices, scale){
         DMATetraFaceCell.call(this, indices, scale, true);
     }
diff --git a/js/menus/LatticeMenuView.js b/js/menus/LatticeMenuView.js
index 9dc9c7cc..884e7324 100644
--- a/js/menus/LatticeMenuView.js
+++ b/js/menus/LatticeMenuView.js
@@ -18,7 +18,6 @@ LatticeMenuView = Backbone.View.extend({
         "change #showInverse":                          "_showInverseCells",
         "click #freeformTetraCell":                     "_setTetraCell",
         "click #freeformOctaCell":                      "_setOctaCell",
-        "click #freeformSquasehdTetraCell":             "_setSquashedTetraCell"
     },
 
 
@@ -120,11 +119,6 @@ LatticeMenuView = Backbone.View.extend({
         this.lattice.set("freeformCellType", "tetra");
     },
 
-    _setSquashedTetraCell: function(e){
-        e.preventDefault();
-        this.lattice.set("freeformCellType", "squashedTetra");
-    },
-
     _setOctaCell: function(e){
         e.preventDefault();
         this.lattice.set("freeformCellType", "octa");
@@ -167,7 +161,6 @@ LatticeMenuView = Backbone.View.extend({
                 <ul role="menu" class="dropdown-menu">\
                     <li><a id="freeformOctaCell" href="#">octa</a></li>\
                     <li><a id="freeformTetraCell" href="#">tetra</a></li>\
-                    <li><a id="freeformSquasehdTetraCell" href="#">squashedTetra</a></li>\
                 </ul>\
             </div><br/>\
         <% } else { %>\
diff --git a/js/models/Lattice.js b/js/models/Lattice.js
index 5790d15e..8de2aa73 100644
--- a/js/models/Lattice.js
+++ b/js/models/Lattice.js
@@ -664,11 +664,9 @@ Lattice = Backbone.Model.extend({
             if (type){
                 if (type == "octa") return new DMAFreeFormOctaCell(index, scale, parentPosition, parentOrientation, direction, parentType);
                 return new DMAFreeFormTetraCell(index, scale, parentPosition, parentOrientation, direction, parentType);
-//                return new DMAFreeFormSquashedTetraCell(index, scale, parentPosition, parentOrientation, direction, parentType);
             }
             if (this.get("freeformCellType") == "octa") return new DMAFreeFormOctaCell(index, scale, parentPosition, parentOrientation, direction, parentType);
             return new DMAFreeFormTetraCell(index, scale, parentPosition, parentOrientation, direction, parentType);
-//            return new DMAFreeFormSquashedTetraCell(index, scale, parentPosition, parentOrientation, direction, parentType);
         },
 
         getIndexForPosition: function(absPosition){//only used by baseplane
-- 
GitLab