Skip to content
Snippets Groups Projects
Commit 0a2a6f75 authored by amandaghassaei's avatar amandaghassaei
Browse files

cleanup

parent d744bf83
No related merge requests found
...@@ -109,6 +109,13 @@ Assembler = Backbone.Model.extend({ ...@@ -109,6 +109,13 @@ Assembler = Backbone.Model.extend({
} else console.warn("cam process not supported"); } else console.warn("cam process not supported");
}, },
_getOrder: function(strategy){
if (strategy == "xRaster") return "XYZ";
if (strategy == "yRaster") return "YXZ";
console.warn("strategy not recognized");
return "";
},
postProcess: function(){ postProcess: function(){
this.set("needsPostProcessing", false); this.set("needsPostProcessing", false);
var exporter = this._getExporter(); var exporter = this._getExporter();
...@@ -123,14 +130,10 @@ Assembler = Backbone.Model.extend({ ...@@ -123,14 +130,10 @@ Assembler = Backbone.Model.extend({
var stockHeight = this.get("stockHeight"); var stockHeight = this.get("stockHeight");
data += exporter.moveZ(rapidHeight); data += exporter.moveZ(rapidHeight);
data += "\n"; data += "\n";
var wcs = this.get("originPosition");
var strategy = this.get("camStrategy"); var wcs = this.get("originPosition");
var order;
if (strategy == "xRaster") order = "XYZ";
else if (strategy == "yRaster") order = "YXZ";
var stockPosition = this.get("stockPosition"); var stockPosition = this.get("stockPosition");
dmaGlobals.lattice.rasterCells(order, function(cell, x, y, z){ dmaGlobals.lattice.rasterCells(this._getOrder(this.get("camStrategy"), function(cell){
if (!cell) return; if (!cell) return;
data += exporter.rapidXY(stockPosition.x-wcs.x, stockPosition.y-wcs.y); data += exporter.rapidXY(stockPosition.x-wcs.x, stockPosition.y-wcs.y);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment