From 0e3a9f0795bf52f4e933cb879fa6c91b8c19c4a1 Mon Sep 17 00:00:00 2001 From: Marius Stanciu Date: Tue, 17 Dec 2019 15:11:08 +0200 Subject: [PATCH] - more mods to generate_from_geometry_2() method --- README.md | 1 + camlib.py | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index bbfbbd1e..c5c797b5 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,7 @@ CAD program, and create G-Code for Isolation routing. - added ability to save the Source File as PDF (still have to adjust the page size) - fixed the generate_from_geometry_2() method to use the default values in case the parameters are None - added ability to save the Source File as PDF - fixed page size and added line breaks +- more mods to generate_from_geometry_2() method 16.12.2019 diff --git a/camlib.py b/camlib.py index aaf49c82..f699ee36 100644 --- a/camlib.py +++ b/camlib.py @@ -3488,7 +3488,10 @@ class CNCjob(Geometry): return 'fail' # made sure that depth_per_cut is no more then the z_cut - if abs(self.z_cut) < self.z_depthpercut: + try: + if abs(self.z_cut) < self.z_depthpercut: + self.z_depthpercut = abs(self.z_cut) + except TypeError: self.z_depthpercut = abs(self.z_cut) # ## Index first and last points in paths