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

- fixed a bug in CNCJob generation out of a Excellon object; the plot failed in case some of the geometry of the CNCJob was invalid

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

+ 4 - 0
README.md

@@ -9,6 +9,10 @@ CAD program, and create G-Code for Isolation routing.
 
 =================================================
 
+13.03.2020
+
+- fixed a bug in CNCJob generation out of a Excellon object; the plot failed in case some of the geometry of the CNCJob was invalid
+
 12.03.2020
 
 - working on the new database

+ 3 - 0
camlib.py

@@ -4752,6 +4752,9 @@ class CNCjob(Geometry):
                             # if the geos are travel lines it will enter into Exception
                             poly = geo['geom'].buffer(distance=(tooldia / 1.99999999), resolution=self.steps_per_circle)
                             poly = poly.simplify(tool_tolerance)
+                        except Exception:
+                            # deal here with unexpected plot errors due of LineStrings not valid
+                            continue
                     else:
                         # plot the geometry of any objects other than Excellon
                         poly = geo['geom'].buffer(distance=(tooldia / 1.99999999), resolution=self.steps_per_circle)