From 996b63cf4ee762432a8c5abc2db5cbe3b966815d Mon Sep 17 00:00:00 2001 From: Marius Stanciu Date: Mon, 4 Mar 2019 21:19:55 +0200 Subject: [PATCH] - modified the grbl-laser postprocessor lift_code() - treated an error created by Z_Cut parameter being None - changed the hover and selection box transparency --- FlatCAMApp.py | 14 +++++++------- README.md | 6 ++++++ camlib.py | 10 ++++++++++ postprocessors/grbl_laser.py | 2 +- 4 files changed, 24 insertions(+), 8 deletions(-) diff --git a/FlatCAMApp.py b/FlatCAMApp.py index 379020e0..c96d5ebb 100644 --- a/FlatCAMApp.py +++ b/FlatCAMApp.py @@ -93,8 +93,8 @@ class App(QtCore.QObject): log.addHandler(handler) # Version - version = 8.911 - version_date = "2019/03/4" + version = 8.912 + version_date = "2019/03/11" beta = True # current date now @@ -1582,7 +1582,7 @@ class App(QtCore.QObject): self.poly_not_cleared = False # VisPy visuals - self.hover_shapes = ShapeCollection(parent=self.plotcanvas.vispy_canvas.view.scene, layers=7) + self.hover_shapes = ShapeCollection(parent=self.plotcanvas.vispy_canvas.view.scene, layers=1) self.isHovering = False self.notHovering = True @@ -5024,11 +5024,11 @@ class App(QtCore.QObject): if color: face = Color(color) - face.alpha = 0.3 + face.alpha = 0.2 outline = Color(color, alpha=0.8) else: face = Color(self.defaults['global_sel_fill']) - face.alpha = 0.1 + face.alpha = 0.2 outline = self.defaults['global_sel_line'] self.hover_shapes.add(hover_rect, color=outline, face_color=face, update=True, layer=0, tolerance=None) @@ -5058,10 +5058,10 @@ class App(QtCore.QObject): sel_rect = sel_rect.buffer(0.00787) if color: - face = Color(color, alpha=0.1) + face = Color(color, alpha=0.2) outline = Color(color, alpha=0.8) else: - face = Color(self.defaults['global_sel_fill'], alpha=0.1) + face = Color(self.defaults['global_sel_fill'], alpha=0.2) outline = Color(self.defaults['global_sel_line'], alpha=0.8) self.sel_objects_list.append(self.move_tool.sel_shapes.add(sel_rect, color=outline, diff --git a/README.md b/README.md index 67b1b419..cc738a84 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,12 @@ CAD program, and create G-Code for Isolation routing. ================================================= +5.03.2019 + +- modified the grbl-laser postprocessor lift_code() +- treated an error created by Z_Cut parameter being None +- changed the hover and selection box transparency + 4.03.2019 - finished work on object hovering diff --git a/camlib.py b/camlib.py index b15e65c3..ac0b2762 100644 --- a/camlib.py +++ b/camlib.py @@ -5339,6 +5339,11 @@ class CNCjob(Geometry): self.pp_geometry_name = pp_geometry_name if pp_geometry_name else 'default' self.f_plunge = self.app.defaults["geometry_f_plunge"] + if self.z_cut is None: + self.app.inform.emit("[ERROR_NOTCL] Cut_Z parameter is None. Most likely a bad combinations of " + "other parameters.") + return 'fail' + if self.z_cut > 0: self.app.inform.emit("[WARNING] The Cut Z parameter has positive value. " "It is the depth value to cut into material.\n" @@ -5588,6 +5593,11 @@ class CNCjob(Geometry): self.pp_geometry_name = pp_geometry_name if pp_geometry_name else 'default' self.f_plunge = self.app.defaults["geometry_f_plunge"] + if self.z_cut is None: + self.app.inform.emit("[ERROR_NOTCL] Cut_Z parameter is None. Most likely a bad combinations of " + "other parameters.") + return 'fail' + if self.z_cut > 0: self.app.inform.emit("[WARNING] The Cut Z parameter has positive value. " "It is the depth value to cut into material.\n" diff --git a/postprocessors/grbl_laser.py b/postprocessors/grbl_laser.py index 84e62126..69d2ea23 100644 --- a/postprocessors/grbl_laser.py +++ b/postprocessors/grbl_laser.py @@ -42,7 +42,7 @@ class grbl_laser(FlatCAMPostProc): return '' def lift_code(self, p): - return 'M05' + return 'M05 S0' def down_code(self, p): if p.spindlespeed: