diff options
author | Hiroshi Murayama <opiopan@gmail.com> | 2019-12-28 23:45:33 +0900 |
---|---|---|
committer | Hiroshi Murayama <opiopan@gmail.com> | 2019-12-28 23:45:33 +0900 |
commit | 244fcaa5346f4fad819cc2b72857cfb2c472944a (patch) | |
tree | d849592e18a1afe61fb98f3207dabdaea1f5336e /tests/test_dxf.py | |
parent | d7a069324222bb8f69adc9b1c815fc9f3f6a29d6 (diff) | |
download | gerbonara-244fcaa5346f4fad819cc2b72857cfb2c472944a.tar.gz gerbonara-244fcaa5346f4fad819cc2b72857cfb2c472944a.tar.bz2 gerbonara-244fcaa5346f4fad819cc2b72857cfb2c472944a.zip |
add a function that generate filled gerberdata with representing internal shape by fliping polarity
Diffstat (limited to 'tests/test_dxf.py')
-rw-r--r-- | tests/test_dxf.py | 30 |
1 files changed, 24 insertions, 6 deletions
diff --git a/tests/test_dxf.py b/tests/test_dxf.py index 31589da..3d4d28e 100644 --- a/tests/test_dxf.py +++ b/tests/test_dxf.py @@ -19,7 +19,6 @@ class TestExcellon(unittest.TestCase): cls.OUTPREFIX = 'dxf_' cls.METRIC_FILE = os.path.join(cls.INDIR, 'ref_dxf_metric.dxf') cls.INCH_FILE = os.path.join(cls.INDIR, 'ref_dxf_inch.dxf') - cls.MOUSEBITES_FILE = os.path.join(cls.INDIR, 'ref_dxf_mousebites.dxf') try: os.mkdir(cls.OUTDIR) except FileExistsError: @@ -36,6 +35,7 @@ class TestExcellon(unittest.TestCase): outfile = os.path.join(self.OUTDIR, self.OUTPREFIX + 'save_line.gtl') dxf = gerberex.read(self.METRIC_FILE) dxf.draw_mode = dxf.DM_LINE + dxf.width = 0.2 dxf.write(outfile) self._checkResult(outfile) @@ -46,23 +46,41 @@ class TestExcellon(unittest.TestCase): dxf.write(outfile) self._checkResult(outfile) + def test_save_fill_simple(self): + outfile = os.path.join(self.OUTDIR, self.OUTPREFIX + 'save_fill_simple.gtl') + dxf = gerberex.read(self.METRIC_FILE) + dxf.draw_mode = dxf.DM_FILL + dxf.fill_mode = dxf.FM_SIMPLE + dxf.write(outfile) + self._checkResult(outfile) + def test_save_mousebites(self): outfile = os.path.join(self.OUTDIR, self.OUTPREFIX + 'save_mousebites.gtl') - dxf = gerberex.read(self.MOUSEBITES_FILE) + dxf = gerberex.read(self.METRIC_FILE) dxf.draw_mode = dxf.DM_MOUSE_BITES dxf.width = 0.5 - dxf.pitch = 1 + dxf.pitch = 1.4 dxf.write(outfile) self._checkResult(outfile) def test_save_excellon(self): outfile = os.path.join( + self.OUTDIR, self.OUTPREFIX + 'save_line.txt') + dxf = gerberex.read(self.METRIC_FILE) + dxf.draw_mode = dxf.DM_LINE + dxf.format = (3,3) + dxf.width = 0.2 + dxf.write(outfile, filetype=dxf.FT_EXCELLON) + self._checkResult(outfile) + + def test_save_excellon_mousebites(self): + outfile = os.path.join( self.OUTDIR, self.OUTPREFIX + 'save_mousebites.txt') - dxf = gerberex.read(self.MOUSEBITES_FILE) + dxf = gerberex.read(self.METRIC_FILE) dxf.draw_mode = dxf.DM_MOUSE_BITES - dxf.format = (3,3) + dxf.format = (3, 3) dxf.width = 0.5 - dxf.pitch = 1 + dxf.pitch = 1.4 dxf.write(outfile, filetype=dxf.FT_EXCELLON) self._checkResult(outfile) |