def test_complex_fill_flip(self): outfile = os.path.join( self.OUTDIR, self.OUTPREFIX + 'complex_fill_flip.gtl') ctx = gerberex.GerberComposition() base = gerberex.rectangle(width=100, height=100, left=0, bottom=0, units='metric') base.draw_mode = base.DM_FILL ctx.merge(base) dxf = gerberex.read(self.COMPLEX_FILE) dxf.negate_polarity() dxf.draw_mode = dxf.DM_FILL ctx.merge(dxf) ctx.dump(outfile) self._checkResult(outfile)
file.offset(board[1], board[2]) ctx.merge(file) print('.', end='', flush=True) if ext == 'TXT': file = gerberex.read(mousebites) file.draw_mode = DxfFile.DM_MOUSE_BITES file.width = 0.5 file.format = (3, 3) ctx.merge(file) else: file = gerberex.read(outline) ctx.merge(file) ctx.dump(outputs + '.' + ext) print(' end', flush=True) print('generating GML: ', end='', flush=True) file = gerberex.read(outline) file.write(outputs + '.GML') print('.', end='', flush=True) ctx = GerberComposition() base = gerberex.rectangle(width=100, height=100, left=0, bottom=0, units='metric') base.draw_mode = DxfFile.DM_FILL ctx.merge(base) file.to_metric() file.draw_mode = DxfFile.DM_FILL file.negate_polarity() ctx.merge(file) ctx.dump(outputs + '-fill.GML') print('. end', flush=True)