From 98f4a82ad4be193b5bde16ba6cb14a68e359b25a Mon Sep 17 00:00:00 2001 From: Marius Stanciu Date: Fri, 13 Mar 2020 13:29:59 +0200 Subject: [PATCH] - 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 --- README.md | 4 ++++ camlib.py | 3 +++ 2 files changed, 7 insertions(+) diff --git a/README.md b/README.md index f46213c8..b57d51ea 100644 --- a/README.md +++ b/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 diff --git a/camlib.py b/camlib.py index 88a62488..7e322deb 100644 --- a/camlib.py +++ b/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)