Commit b5521767 authored by Amanda Ghassaei's avatar Amanda Ghassaei
Browse files

stapler working

parent 80a92a00
......@@ -237,6 +237,7 @@ define(['underscore', 'appState', 'lattice', 'stlLoader', 'threeModel', 'cam', '
callback();
}
console.log(position);
var startingPos = this.components.xAxis.getPosition().add(this.components.yAxis.getPosition().add(this.components.zAxis.getPosition()));//this.components.zAxis.getAbsolutePosition();//get position of end effector
speed = this._normalizeSpeed(startingPos, position, new THREE.Vector3(speed, speed, speed));//todo fix this
......
......@@ -106,6 +106,8 @@ define(['underscore', 'appState', 'lattice', 'cam'], function(_, appState, latti
this.customCalcPositionOffsets = function(index, position, material, settings, context){
//this feeds into moveXY and placePart functions
position.sub(settings.originPosition);
if (index.z%2 != 0){
//offset for rotation
var offset = this.components.substrate.centerOfRotation.clone().multiplyScalar(settings.scale);//offset in mm
......@@ -122,7 +124,6 @@ define(['underscore', 'appState', 'lattice', 'cam'], function(_, appState, latti
}
position.sub(stock.getPosition().multiplyScalar(settings.scale));
position.sub(settings.originPosition);
return position;
}
......
......@@ -31,7 +31,7 @@ define(['underscore', 'cam', 'three', 'component', 'lattice', 'threeModel'],
};
StockComponent.prototype.getPosition = function(){
return this.cell.getPosition();
return this.object3D.position.clone();
};
StockComponent.prototype.setMaterial = function(materialName){
......
Markdown is supported
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