From 00e699025457453dafb9ae0474fbf8fd36e329a5 Mon Sep 17 00:00:00 2001 From: Marius Stanciu Date: Thu, 5 Dec 2019 01:16:17 +0200 Subject: [PATCH] - in NCC Tool, the new Geometry object that is created on copper clear now has the solid_geometry attribute where the geometry is stored not only in the obj.tools attribute --- README.md | 4 ++++ flatcamTools/ToolNonCopperClear.py | 22 +++++++++++++++++++++- 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ba6243eb..dca72cf7 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,10 @@ CAD program, and create G-Code for Isolation routing. ================================================= +5.12.2019 + +- in NCC Tool, the new Geometry object that is created on copper clear now has the solid_geometry attribute where the geometry is stored not only in the obj.tools attribute + 4.12.2019 - made sure that if an older preferences file is detected then there are no errors and only the parameters that are currently active are loaded; the factory defaults file is deleted and recreated in the new format diff --git a/flatcamTools/ToolNonCopperClear.py b/flatcamTools/ToolNonCopperClear.py index 46b890f1..8b75a7cd 100644 --- a/flatcamTools/ToolNonCopperClear.py +++ b/flatcamTools/ToolNonCopperClear.py @@ -329,7 +329,7 @@ class NonCopperClear(FlatCAMTool, Gerber): self.ncc_overlap_entry = FCDoubleSpinner(suffix='%') self.ncc_overlap_entry.set_precision(self.decimals) self.ncc_overlap_entry.setWrapping(True) - self.ncc_overlap_entry.setRange(0.000, 0.999) + self.ncc_overlap_entry.setRange(0.000, 99.9999) self.ncc_overlap_entry.setSingleStep(0.1) grid3.addWidget(nccoverlabel, 2, 0) grid3.addWidget(self.ncc_overlap_entry, 2, 1) @@ -1921,6 +1921,16 @@ class NonCopperClear(FlatCAMTool, Gerber): "Change the painting parameters and try again.")) return + # create the solid_geometry + geo_obj.solid_geometry = list() + for tooluid in geo_obj.tools: + if geo_obj.tools[tooluid]['solid_geometry']: + try: + for geo in geo_obj.tools[tooluid]['solid_geometry']: + geo_obj.solid_geometry.append(geo) + except TypeError: + geo_obj.solid_geometry.append(geo_obj.tools[tooluid]['solid_geometry']) + # Experimental... # print("Indexing...", end=' ') # geo_obj.make_index() @@ -2298,6 +2308,16 @@ class NonCopperClear(FlatCAMTool, Gerber): '[WARNING] %s: %s %s.' % (_("NCC Tool Rest Machining clear all done but the copper features " "isolation is broken for"), str(warning_flag), _("tools"))) return + + # create the solid_geometry + geo_obj.solid_geometry = list() + for tooluid in geo_obj.tools: + if geo_obj.tools[tooluid]['solid_geometry']: + try: + for geo in geo_obj.tools[tooluid]['solid_geometry']: + geo_obj.solid_geometry.append(geo) + except TypeError: + geo_obj.solid_geometry.append(geo_obj.tools[tooluid]['solid_geometry']) else: # I will use this variable for this purpose although it was meant for something else # signal that we have no geo in the object therefore don't create it