diff --git a/js/cam/assemblers/Assembler.js b/js/cam/assemblers/Assembler.js index cbf6980fb347137d88d6c0241c3367ddeaad59b9..1a74ec14bc7438ccabbe5504e09aeea4cbc44243 100644 --- a/js/cam/assemblers/Assembler.js +++ b/js/cam/assemblers/Assembler.js @@ -236,7 +236,7 @@ define(['underscore', 'appState', 'lattice', 'stlLoader', 'threeModel', 'cam', ' callback(); } - 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 + var startingPos = this.components.xAxis.getPosition().add(this.components.frame.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 this.components.xAxis.moveTo(position, speed.x, sketchyCallback); this.components.frame.moveTo(position, speed.y, sketchyCallback); diff --git a/js/cam/assemblers/AssemblerPost.js b/js/cam/assemblers/AssemblerPost.js index 3d7eebe82ac0680bb1c6c7f8d4ac0b278f4035f8..fda2586c2d2818316efe20721fbba43469a29aa0 100644 --- a/js/cam/assemblers/AssemblerPost.js +++ b/js/cam/assemblers/AssemblerPost.js @@ -9,14 +9,15 @@ define(['underscore', 'appState', 'lattice', 'cam'], function(_, appState, latti function AssemblerPost(id, json){ - //settings: -// feedRate: THREE.Vector3 -// originPosition: THREE.Vector3 + //what's in "settings"? + +// feedRate: THREE.Vector3 - slow speeds, exporter.move commands use this speed +// originPosition: THREE.Vector3 - you won't need this // rapidHeight: 30 - max z height of machine, used when we want to be sure we're clear -// rapidSpeeds: THREE.Vector3 +// rapidSpeeds: THREE.Vector3 - fast speeds, exporter.rapid use this speed // safeHeight: 4.5 - height above parts where we start to move slowly -// scale: 1.27 -// stockPosition: THREE.Vector3 +// scale: 1.27 - all positions and speeds are already scaled for you to mm +// stockPosition: THREE.Vector3 - not used for your machine this.customFunctionsContext = { zClearHeight: 8,//height above part to clear during assembly @@ -99,11 +100,16 @@ define(['underscore', 'appState', 'lattice', 'cam'], function(_, appState, latti data += exporter.rapidZ(position.z + context.zClearHeight, settings); return data; }; + } + + + + + - } @@ -199,6 +205,12 @@ define(['underscore', 'appState', 'lattice', 'cam'], function(_, appState, latti position.sub(stock.getPosition().multiplyScalar(settings.scale)); position.sub(settings.originPosition); +// position.add(new THREE.Vector3(18.23*((index.z+1)%2), 0.3*((index.z+1)%2), 0)); + +// (5.08mm, 5.715mm) +// x = part_pos[0]*1.27 + 18.23*((layer+1)%2) +// y = part_pos[1]*1.27 + 0.3*((layer+1)%2) + data += this.customMoveXY(position.clone(), exporter.getPostPosition(), index.clone(), exporter, settings, context); data += this.customPlacePart(position.clone(), index.clone(), material, exporter, settings, context);