Просмотр исходного кода

- modified the grbl-laser postprocessor lift_code()
- treated an error created by Z_Cut parameter being None
- changed the hover and selection box transparency

Marius Stanciu 6 лет назад
Родитель
Сommit
996b63cf4e
4 измененных файлов с 24 добавлено и 8 удалено
  1. 7 7
      FlatCAMApp.py
  2. 6 0
      README.md
  3. 10 0
      camlib.py
  4. 1 1
      postprocessors/grbl_laser.py

+ 7 - 7
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,

+ 6 - 0
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

+ 10 - 0
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"

+ 1 - 1
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: