- 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

This commit is contained in:
Marius Stanciu
2022-01-09 21:20:42 +02:00
committed by Marius
parent e219562bbb
commit 747a2f0de4
2 changed files with 5 additions and 1 deletions

View File

@@ -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: