From 244fcaa5346f4fad819cc2b72857cfb2c472944a Mon Sep 17 00:00:00 2001 From: Hiroshi Murayama Date: Sat, 28 Dec 2019 23:45:33 +0900 Subject: add a function that generate filled gerberdata with representing internal shape by fliping polarity --- examples/panelize.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'examples/panelize.py') diff --git a/examples/panelize.py b/examples/panelize.py index 34cc446..20a2cac 100755 --- a/examples/panelize.py +++ b/examples/panelize.py @@ -18,7 +18,6 @@ boards=[ ] outline = 'inputs/outline.dxf' mousebites = 'inputs/mousebites.dxf' -fill = 'inputs/fill.dxf' outputs = 'outputs/panelized' os.chdir(os.path.dirname(__file__)) @@ -62,9 +61,11 @@ file = gerberex.read(outline) file.write(outputs + '.GML') putstr('.') ctx = GerberComposition() -file = gerberex.read(fill) -file.to_metric() +base = gerberex.rectangle(width=100, height=100, left=0, bottom=0, units='metric') +base.draw_mode = DxfFile.DM_FILL +ctx.merge(base) file.draw_mode = DxfFile.DM_FILL +file.negate_polarity() ctx.merge(file) ctx.dump(outputs + '-fill.GML') -- cgit