diff --git a/js/cam/assemblers/Assembler.js b/js/cam/assemblers/Assembler.js index b1bc3057eb77616ae79b46c4478f71d7c28514f2..59e21767f52704db3968401c6b6d00bdc75a6179 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 8e87a816db4694f42c6e82848d3e4de93c621cb2..5db77c8a5115cf61244b3700df404108cc583ef8 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; };