Commit 4348a612 authored by Amanda Ghassaei's avatar Amanda Ghassaei
Browse files

moved origin

parent c793d8a2
No preview for this file type
......@@ -68,7 +68,7 @@ define(['underscore', 'appState', 'lattice', 'stlLoader', 'threeModel', 'cam', '
}
if (json.scale) geometry.applyMatrix(new THREE.Matrix4().makeScale(json.scale, json.scale, json.scale));
geometry.applyMatrix(new THREE.Matrix4().makeTranslation(-21, -0.63, 0));//todo get rid of these
geometry.applyMatrix(new THREE.Matrix4().makeTranslation(-21, -0.63, -1.28));//todo get rid of these
// geometry.applyMatrix(new THREE.Matrix4().makeRotationZ(Math.PI/2));
return geometry;
}
......@@ -249,7 +249,6 @@ define(['underscore', 'appState', 'lattice', 'stlLoader', 'threeModel', 'cam', '
if (position.x === null && position.y === null) return speed;
var deltaX = position.x-startingPos.x;
var deltaY = position.y-startingPos.y;
console.log(deltaX + " " + deltaY);
var totalDistance = Math.sqrt(Math.pow(deltaX, 2) + Math.pow(deltaY, 2));
if (totalDistance == 0) return speed;
speed.x = Math.abs(deltaX/totalDistance*speed.x);
......
......@@ -91,10 +91,11 @@ define(['underscore', 'appState', 'lattice', 'cam'], function(_, appState, latti
if (material == "brass") data += exporter.addLine("M3");
else if (material == "fiberGlass") data += exporter.addLine("M4");
data += exporter.addComment(JSON.stringify(index));
data += exporter.addLine("G4", ["P" + context.stockWait]);
data += exporter.addLine("M5");
data += exporter.addComment(JSON.stringify(index));//leave this, tells sim to show cell
data += exporter.moveZ(position.z - context.zPreload, settings);//need this line?
data += exporter.moveZ(position.z + settings.safeHeight, settings);
......
......@@ -51,7 +51,6 @@ define(['underscore', 'cam', 'three', 'component', 'lattice', 'threeModel'],
StockComponent.prototype.show = function(){
this.cell.show();
console.log(this.cell);
};
StockComponent.prototype.hide = function(){
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment