From 7d0436fed75a4f914584d37cbbc2b7adfd1d54fc Mon Sep 17 00:00:00 2001
From: Amanda Ghassaei <amandaghassaei@gmail.com>
Date: Sun, 16 Aug 2015 17:44:29 -0400
Subject: [PATCH] eod

---
 js/cam/assemblers/Assembler.js    | 15 +++++++++++++++
 js/cam/processes/GCodeExporter.js |  3 ---
 2 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/js/cam/assemblers/Assembler.js b/js/cam/assemblers/Assembler.js
index b1bc3057..59e21767 100644
--- a/js/cam/assemblers/Assembler.js
+++ b/js/cam/assemblers/Assembler.js
@@ -19,6 +19,13 @@ define(['underscore', 'appState', 'lattice', 'stlLoader', 'threeModel', 'cam', '
         this.camProcesses = json.camProcesses;
         this.numMaterials = json.numMaterials;
 
+        this.customHeader = json.customHeader || function(settings){
+//            this.home(settings);
+        };
+        this.customFooter = json.customFooter || function(){};
+        this.customHome = json.customHome || function(){};
+        this.customPickUpStock = json.customPickUpStock || function(){};
+        this.customPlacePart = json.customPlacePart || function(){};
 
         this.object3D = new THREE.Object3D();
         three.sceneAdd(this.object3D);
@@ -196,6 +203,14 @@ define(['underscore', 'appState', 'lattice', 'stlLoader', 'threeModel', 'cam', '
 
         return data;
     };
+
+    Assembler.prototype.makeHeader = function(settings){
+        return this.customHeader(settings);
+    };
+
+    Assembler.prototype.home = function(exporter, settings){
+        return exporter.goHome(settings);
+    };
     
     Assembler.prototype._postProcessCells = function(settings, exporter){
         var data = "";
diff --git a/js/cam/processes/GCodeExporter.js b/js/cam/processes/GCodeExporter.js
index 8e87a816..5db77c8a 100644
--- a/js/cam/processes/GCodeExporter.js
+++ b/js/cam/processes/GCodeExporter.js
@@ -19,9 +19,6 @@ define(['underscore', 'cam', 'lattice'], function(_, cam, lattice){
     ////    data += this.addLine("G49", [], "cancel tool length comp");
     //    data += this.addLine("G40", [], "cancel tool radius comp");
     ////    data += this.addLine("M09", [], "coolant off");
-
-        data += this.goHome(settings);
-
         return data;
     };
 
-- 
GitLab