From f879aa8e3d3d4ebeafd0bcb2aef3e997040e2306 Mon Sep 17 00:00:00 2001 From: Amanda Ghassaei <amandaghassaei@gmail.com> Date: Thu, 20 Aug 2015 13:10:22 -0400 Subject: [PATCH] eod --- js/cam/assemblers/AssemblerPost.js | 8 +++++--- js/cam/assemblers/Component.js | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/js/cam/assemblers/AssemblerPost.js b/js/cam/assemblers/AssemblerPost.js index 62ed2f32..55d183fa 100644 --- a/js/cam/assemblers/AssemblerPost.js +++ b/js/cam/assemblers/AssemblerPost.js @@ -196,11 +196,13 @@ define(['underscore', 'appState', 'lattice', 'cam'], function(_, appState, latti AssemblerPost.prototype._postReleaseStock = function(index, position, material, settings, exporter, context){ var data = ""; - //offset for rotation - var offset = this.components.substrate.centerOfRotation.clone().multiplyScalar(settings.scale); + // position.add(new THREE.Vector3(18.23*((index.z)%2), 0.3*((index.z)%2), 0)); if (index.z%2 != 0){ - position = new THREE.Vector3(-position.y, position.x, position.z); + //offset for rotation + var offset = this.components.substrate.centerOfRotation.clone().multiplyScalar(settings.scale);//offset in mm + var dist = position.clone().sub(offset); + position = offset.add(new THREE.Vector3(dist.y, -dist.x, position.z)); } var stock = _.find(this.stock, function(thisStock){ diff --git a/js/cam/assemblers/Component.js b/js/cam/assemblers/Component.js index ceb9381d..919b346d 100644 --- a/js/cam/assemblers/Component.js +++ b/js/cam/assemblers/Component.js @@ -209,7 +209,7 @@ define(['underscore', 'cam', 'three'], function(_, cam, THREE){ if (callback) callback(); return; } - target = this.applyRotation(target);//absolute? + target = this.applyAbsoluteRotation(target);//absolute? var currentPosition = this.getPosition(); var increment = speed/1500.0*cam.get("simSpeed"); -- GitLab