From f0d8dd8248559c4293e06cdedc08e35076100c46 Mon Sep 17 00:00:00 2001 From: Amanda Ghassaei <amandaghassaei@gmail.com> Date: Fri, 27 Mar 2015 01:05:35 -0400 Subject: [PATCH] debugging --- js/cam/Assembler.js | 2 +- js/cam/Machine.js | 2 +- js/fea/DmaCellOcta.js | 5 +++++ js/models/AppState.js | 8 ++++---- 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/js/cam/Assembler.js b/js/cam/Assembler.js index 50ceef8e..3863168c 100644 --- a/js/cam/Assembler.js +++ b/js/cam/Assembler.js @@ -90,7 +90,7 @@ Assembler = Backbone.Model.extend({ this.set("machine", new God()); this.set("camProcess", "gcode"); this.set("originPosition", {x:0,y:0,z:0}); - this.set("stockPosition", {x:0,y:0,z:50});//todo calculate a good stock position + this.set("stockPosition", {x:0,y:0,z:150});//todo calculate a good stock position } else if (machineName == "oneBitBot"){ this.set("machine", new OneBitBot()); this.set("camProcess", "gcode"); diff --git a/js/cam/Machine.js b/js/cam/Machine.js index 67163ee7..6a255c2f 100644 --- a/js/cam/Machine.js +++ b/js/cam/Machine.js @@ -321,7 +321,7 @@ God.prototype._postPickUpStock = function(exporter, stockPosition, rapidHeight, return data; }; -God.prototype._postReleaseStock = function(cell, exporter, rapidHeight, wcs, safeHeight){ +God.prototype._postReleaseStock = function(cellPosition, cell, exporter, rapidHeight, wcs, safeHeight){ var data = ""; var cellPosition = cell.getPosition(); data += exporter.rapidXY(cellPosition.x-wcs.x, cellPosition.y-wcs.y); diff --git a/js/fea/DmaCellOcta.js b/js/fea/DmaCellOcta.js index ad3a8bd6..fda02f81 100644 --- a/js/fea/DmaCellOcta.js +++ b/js/fea/DmaCellOcta.js @@ -68,6 +68,11 @@ DMAFreeFormOctaCell.prototype = Object.create(DMAFreeFormCell.prototype); DMAFreeFormOctaCell.prototype._doMeshTransformations = function(mesh){ + if (!this.parentDirection) { + this.parentDirection = new THREE.Vector3(0,0,1); + this.parentQuaternion = new THREE.Quaternion(); + this.parentPos = new THREE.Vector3(0,0,0); + } var direction = this.parentDirection.clone(); var zAxis = new THREE.Vector3(0,0,1); zAxis.applyQuaternion(this.parentQuaternion); diff --git a/js/models/AppState.js b/js/models/AppState.js index 4794e649..9c5b44ec 100644 --- a/js/models/AppState.js +++ b/js/models/AppState.js @@ -72,11 +72,11 @@ AppState = Backbone.Model.extend({ vox: "Snap Voxel" //beam:"Beam" }, - vertex: { + vertex: null//{ //beam:"Beam", - square:"Square", - xShape:"X" - } +// square:"Square", +// xShape:"X" +// } }, tetra: {vertex: null}, cube: {face: null}, -- GitLab