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

- fixed an issue when multi depth step is larger than the depth of cut

Marius Stanciu 6 лет назад
Родитель
Сommit
4d9ff1c134
2 измененных файлов с 7 добавлено и 2 удалено
  1. 1 0
      README.md
  2. 6 2
      camlib.py

+ 1 - 0
README.md

@@ -14,6 +14,7 @@ CAD program, and create G-Code for Isolation routing.
 - fixed open handlers
 - fixed issue in NCC Tool where the tool table context menu could be installed multiple times
 - added new ability to create simple isolation's in the NCC Tool
+- fixed an issue when multi depth step is larger than the depth of cut
 
 27.08.2019
 

+ 6 - 2
camlib.py

@@ -5765,8 +5765,8 @@ class CNCjob(Geometry):
             return 'fail'
 
         # made sure that depth_per_cut is no more then the z_cut
-        if self.z_cut < self.z_depthpercut:
-            self.z_depthpercut = self.z_cut
+        if abs(self.z_cut) < self.z_depthpercut:
+            self.z_depthpercut = abs(self.z_cut)
 
         if self.z_move is None:
             self.app.inform.emit(_("[ERROR_NOTCL] Travel Z parameter is None or zero."))
@@ -6073,6 +6073,10 @@ class CNCjob(Geometry):
                                    "This is dangerous, skipping %s file") % self.options['name'])
             return 'fail'
 
+        # made sure that depth_per_cut is no more then the z_cut
+        if abs(self.z_cut) < self.z_depthpercut:
+            self.z_depthpercut = abs(self.z_cut)
+
         # ## Index first and last points in paths
         # What points to index.
         def get_pts(o):