From f032528025fb52e493f57c7ab637c68ded50e690 Mon Sep 17 00:00:00 2001 From: Marius Stanciu Date: Thu, 19 Nov 2020 23:00:36 +0200 Subject: [PATCH] - fixed the Gerber parser such that when it encounter an aperture with size 0.0 it will replace it with the smallest number that is still displayed which is (10 ** -self.decimals); previously it replaced with a too small number (1e-12) --- CHANGELOG.md | 1 + appParsers/ParseGerber.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index af19dac3..8057c9ce 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ CHANGELOG for FlatCAM beta - cleaned up the Geometry Properties UI - in Geometry Properties UI restored the plot functionality - in Tool Cutout fixed issues when using a negative value for the Margin parameter when the cutout object is a Gerber object +- fixed the Gerber parser such that when it encounter an aperture with size 0.0 it will replace it with the smallest number that is still displayed which is (10 ** -self.decimals); previously it replaced with a too small number (1e-12) 17.11.2020 diff --git a/appParsers/ParseGerber.py b/appParsers/ParseGerber.py index 0888f8dc..2720a5e7 100644 --- a/appParsers/ParseGerber.py +++ b/appParsers/ParseGerber.py @@ -718,7 +718,7 @@ class Gerber(Geometry): # we should not test for "size" key as it does not exist in this case. if self.apertures[current_aperture]["type"] != "AM": if self.apertures[current_aperture]["size"] == 0: - self.apertures[current_aperture]["size"] = 1e-12 + self.apertures[current_aperture]["size"] = 10 ** -self.decimals # log.debug(self.apertures[current_aperture]) # Take care of the current path with the previous tool