From 747a2f0de4ffbcd6faba2a38af1944a236494e2e Mon Sep 17 00:00:00 2001 From: Marius Stanciu Date: Sun, 9 Jan 2022 21:20:42 +0200 Subject: [PATCH] - fixed a Gerber parser issue shown by Gerber files generated by Autotrax DEX ECAD software: if the last operation before a region was a flash D03 then at the beginning of the region a flash was added with the previous aperture --- CHANGELOG.md | 1 + appParsers/ParseGerber.py | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3ce3c266..f9e7eb4f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ CHANGELOG for FlatCAM beta - some UI changes in the Preferences: the clicked tab now have a distinctive color (green) and some strings are optimized - added in CNCJob preferences new preferences that allow compensation for the CNC bed skew/tilt (axes not being square one to another) - all pre-processors are altered such they can adjust the gcode to use the compensation values set in Preferences -> CNC-Job section +- fixed a Gerber parser issue shown by Gerber files generated by Autotrax DEX ECAD software: if the last operation before a region was a flash D03 then at the beginning of the region a flash was added with the previous aperture 8.01.2021 diff --git a/appParsers/ParseGerber.py b/appParsers/ParseGerber.py index 7fd5e098..cb3cd310 100644 --- a/appParsers/ParseGerber.py +++ b/appParsers/ParseGerber.py @@ -876,6 +876,9 @@ class Gerber(Geometry): path = [path[-1]] making_region = True + # flashes are not allowed inside regions + if current_operation_code == 3: + current_operation_code = 2 continue # ################################################################ @@ -1068,7 +1071,7 @@ class Gerber(Geometry): if match.group(4) is not None: current_operation_code = int(match.group(4)) - # Pen down: add segment + # Pen down: add segment if current_operation_code == 1: # if linear_x or linear_y are None, ignore those if current_x is not None and current_y is not None: