- moved back the ApertureMacro class to camlib for now and made some import changes in the new ParseGerber and ParseExcellon classes

- some changes to the tests - perhaps I will try adding a few tests in the future
This commit is contained in:
Marius Stanciu
2019-10-06 15:56:41 +03:00
committed by Marius
parent 2c536258ed
commit a6b89dbf3a
22 changed files with 646 additions and 562 deletions

View File

@@ -1,15 +1,16 @@
import unittest
import camlib
from flatcamParsers.ParseGerber import Gerber
class GerberBuffer(unittest.TestCase):
def setUp(self):
self.gerber1 = camlib.Gerber()
self.gerber1 = Gerber()
self.gerber1.use_buffer_for_union = True
self.gerber1.parse_file("tests/gerber_files/STM32F4-spindle.cmp")
geometry1 = self.gerber1.solid_geometry
self.geometry1_area = self.compute_area(geometry1)
self.gerber2 = camlib.Gerber()
self.gerber2 = Gerber()
self.gerber2.use_buffer_for_union = False
self.gerber2.parse_file("tests/gerber_files/STM32F4-spindle.cmp")
geometry2 = self.gerber2.solid_geometry
@@ -21,7 +22,7 @@ class GerberBuffer(unittest.TestCase):
for geo in geometry:
area += geo.area
## Not iterable, do the actual indexing and add.
# Not iterable, do the actual indexing and add.
except TypeError:
area = geometry.area
return area