diff --git a/data/users/ben.user b/data/users/ben.user index de890becd66c0e8d9db95d939bd1974d3da4d78d..276b6ee6aade319b5ebc8cb63b9a1441114fa284 100644 --- a/data/users/ben.user +++ b/data/users/ben.user @@ -1 +1 @@ -{"lattice":{"units":"inches","scale":2.78388,"shouldPreserveCells":true,"cellSeparation":{"xy":0,"z":0},"cellType":"octa","connectionType":"edgeRot","partType":"vox"},"assembler":{"camStrategy":"raster","placementOrder":"-X-YZ","camProcess":"shopbot","machineName":"shopbot","rapidHeight":6.9,"safeHeight":0.5,"originPosition":{"x":-1.39194,"y":1.39194,"z":0},"stockPosition":{"x":-4.713,"y":-13.321,"z":-1.303},"rapidSpeeds":{"xy":6,"z":4},"feedRate":{"xy":0.1,"z":0.1},"stockHeight":0}} \ No newline at end of file +{"lattice":{"units":"inches","scale":2.78388,"cellSeparation":{"xy":0,"z":0},"cellType":"octa","connectionType":"edgeRot","partType":"vox"},"assembler":{"camStrategy":"raster","placementOrder":"-X-YZ","camProcess":"shopbot","machineName":"shopbot","rapidHeight":6.9,"safeHeight":0.5,"rapidSpeeds":{"xy":6,"z":4},"feedRate":{"xy":0.1,"z":0.1}}} \ No newline at end of file diff --git a/js/cam/Machine.js b/js/cam/Machine.js index c40184119affe97c699d1452500d97a850d31126..1e2f71975d3d02340c5e5c6ee450291dede32cdf 100644 --- a/js/cam/Machine.js +++ b/js/cam/Machine.js @@ -275,9 +275,9 @@ Shopbot.prototype._buildMeshes = function(callback){ var material = this.material; (new THREE.STLLoader()).load("assets/stls/shopbot/shopbotEndEffector.stl", function(geometry){ geometry.computeBoundingBox(); - var unitScale = 1.5/geometry.boundingBox.max.y/2.78388; + var unitScale = 0.5/geometry.boundingBox.max.y; geometry.applyMatrix(new THREE.Matrix4().makeScale(unitScale, unitScale, unitScale)); - geometry.applyMatrix(new THREE.Matrix4().makeTranslation(0,0, Math.sqrt(2)/2)); + geometry.applyMatrix(new THREE.Matrix4().makeTranslation(0,0,1.13)); var mesh = new THREE.Mesh(geometry, material); mesh.visible = false; meshes.endEffector = mesh; diff --git a/js/cam/TinyGExporter.js b/js/cam/TinyGExporter.js index 7dec678e234326c69a53f92637a90c6da5d6e5b0..b00378d5a57dd8965e6418a145959c8214beecd9 100644 --- a/js/cam/TinyGExporter.js +++ b/js/cam/TinyGExporter.js @@ -24,17 +24,20 @@ TinyGExporter.prototype._setSpeed = function(speed){ }; TinyGExporter.prototype.goHome = function(){ - return this.addComment("home"); +// var data = this.addComment("home z"); +// data += "M9 \nM3 \nG4 P0.05 \nM5 \nG4 P0.05 \nM9 \nM3 \nG4 P0.05 \nM5 \nG4 P0.05 \nM9 \nM3 \nG4 P0.05 \nM5 \nG4 P0.5 \n";data += "G28.2 Z0\n";//home Z +// data += "G4 P2\n";//pause + return ""; }; TinyGExporter.prototype.engageZAxis = function(type, cellPosition, cell, wcs){ var data = ""; if (type == "cell"){ - if (Math.abs(cellPosition.z-wcs.z)<0.001) data += "M3 \nG4 P0.05 \nM5 \nG4 P0.05 \nM3 \nG4 P0.05 \nM5 \nG4 P0.05 \nM3 \nG4 P0.05 \nM5 \nG4 P0.5 \n";//lower height - else data += "M3 \nG4 P0.05 \nM5 \nG4 P0.05 \nM3 \nG4 P0.05 \nM5 \nG4 P0.05 \nM3 \nG4 P0.05 \nM5 \nG4 P0.5 \n";//upper height + if (Math.abs(cellPosition.z-wcs.z)<0.001) data += "M9 \nM3 \nG4 P0.05 \nM5 \nG4 P0.05 \nM8 \nM3 \nG4 P0.05 \nM5 \nG4 P0.05 \nM9 \nM3 \nG4 P0.05 \nM5 \nG4 P0.5 \n";//lower height + else data += "M9 \nM3 \nG4 P0.05 \nM5 \nG4 P0.05 \nM8 \nM3 \nG4 P0.05 \nM5 \nG4 P0.05 \nM8 \nM3 \nG4 P0.05 \nM5 \nG4 P0.5 \n";//upper height data += this.addComment(JSON.stringify(cell.indices)); } else if (type == "stock"){ - data += "M3 \nG4 P0.05 \nM5 \nG4 P0.05 \nM3 \nG4 P0.05 \nM5 \nG4 P0.05 \nM3 \nG4 P0.05 \nM5 \nG4 P0.5 \n"; + data += "M9 \nM3 \nG4 P0.05 \nM5 \nG4 P0.05 \nM9 \nM3 \nG4 P0.05 \nM5 \nG4 P0.05 \nM8 \nM3 \nG4 P0.05 \nM5 \nG4 P0.5 \n"; } else { console.warn("tinyG type not recognized"); return "";