From 34ee7a2578d43afefaa221ae2a4c9fc60ba71b72 Mon Sep 17 00:00:00 2001 From: Teja Date: Sun, 15 Nov 2015 18:22:29 +0100 Subject: [PATCH 1/4] bugfix: fit to working area now uses all the space. --- src/octoprint/plugins/svgtogcode/static/js/working_area.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/octoprint/plugins/svgtogcode/static/js/working_area.js b/src/octoprint/plugins/svgtogcode/static/js/working_area.js index 3c0d93da..24f4d498 100644 --- a/src/octoprint/plugins/svgtogcode/static/js/working_area.js +++ b/src/octoprint/plugins/svgtogcode/static/js/working_area.js @@ -335,7 +335,7 @@ $(function(){ var tooHigh = svgBB.h > waBB.h; var scale = 1; if(tooWide || tooHigh){ - scale = Math.min(waBB.w / svgBB.w, waBB.h / svgBB.h) - 0.01; // scale minimal smaller to avoid rounding errors + scale = Math.min(waBB.w / svgBB.w, waBB.h / svgBB.h) - 0.0001; // scale minimal smaller to avoid rounding errors } var dx = 0; From 21f26648eb3bbd072657590c850c625cf8818160 Mon Sep 17 00:00:00 2001 From: Teja Date: Sun, 15 Nov 2015 18:23:59 +0100 Subject: [PATCH 2/4] bugfix. machine endstop switches are taken into account correctly when calculating the working area. --- src/octoprint/plugins/lasercutterprofiles/profile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/octoprint/plugins/lasercutterprofiles/profile.py b/src/octoprint/plugins/lasercutterprofiles/profile.py index e493de03..c662a557 100644 --- a/src/octoprint/plugins/lasercutterprofiles/profile.py +++ b/src/octoprint/plugins/lasercutterprofiles/profile.py @@ -32,8 +32,8 @@ class LaserCutterProfileManager(object): width = 217, depth = 298, height = 0, - origin_offset_x = 1, - origin_offset_y = 1, + origin_offset_x = 1.1, + origin_offset_y = 1.1, ), zAxis = False, axes=dict( From ef9ddd2864cc5aa64f86972c0ab42a09969479c5 Mon Sep 17 00:00:00 2001 From: make-ing Date: Mon, 16 Nov 2015 15:06:42 +0100 Subject: [PATCH 3/4] reset Arduino after alarm message (by closing and opening the serial port) --- src/octoprint/util/comm_acc2.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/octoprint/util/comm_acc2.py b/src/octoprint/util/comm_acc2.py index 6a9f7bfd..2ad4a3be 100644 --- a/src/octoprint/util/comm_acc2.py +++ b/src/octoprint/util/comm_acc2.py @@ -377,6 +377,10 @@ class MachineCom(object): self._send_event.clear(completely=True) self._changeState(self.STATE_LOCKED) + # close and open serial port to reset arduino + self._serial.close() + self._openSerial() + def _handle_feedback_message(self, line): if line[1:].startswith('Res'): # [Reset to continue] pass From deda1d4bc761dc50eec20d327c32f3ecb98569d0 Mon Sep 17 00:00:00 2001 From: Teja Date: Mon, 16 Nov 2015 15:29:19 +0100 Subject: [PATCH 4/4] code cleanup --- src/octoprint/plugins/svgtogcode/static/js/convert.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/octoprint/plugins/svgtogcode/static/js/convert.js b/src/octoprint/plugins/svgtogcode/static/js/convert.js index 9ba684cb..fe37227f 100644 --- a/src/octoprint/plugins/svgtogcode/static/js/convert.js +++ b/src/octoprint/plugins/svgtogcode/static/js/convert.js @@ -110,7 +110,7 @@ $(function(){ self.cancel_conversion = function(){ if(self.slicing_in_progress()){ - console.log('cancel slicing', self.slicing_in_progress()); + //console.log('cancel slicing', self.slicing_in_progress()); // TODO cancel slicing properly } };