summaryrefslogtreecommitdiff
path: root/gerberex/common.py
diff options
context:
space:
mode:
authoropiopan <opiopan@gmail.com>2019-04-03 12:17:59 +0900
committeropiopan <opiopan@gmail.com>2019-04-03 12:17:59 +0900
commit6b4603af21839c94a33d3804c364ff1b809eb341 (patch)
tree8759a5616f1fef21a3a1c734582b59e42f7d5df3 /gerberex/common.py
parentcb420e39e278f7ab6f002600a7698d7be101eb7d (diff)
downloadgerbonara-6b4603af21839c94a33d3804c364ff1b809eb341.tar.gz
gerbonara-6b4603af21839c94a33d3804c364ff1b809eb341.tar.bz2
gerbonara-6b4603af21839c94a33d3804c364ff1b809eb341.zip
add rectangle generator
Diffstat (limited to 'gerberex/common.py')
-rw-r--r--gerberex/common.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/gerberex/common.py b/gerberex/common.py
index 4a85bd4..47bc6b3 100644
--- a/gerberex/common.py
+++ b/gerberex/common.py
@@ -33,3 +33,8 @@ def loads(data, filename=None, format=None):
return ipc356.loads(data, filename=filename)
else:
raise ParseError('Unable to detect file format')
+
+
+def rectangle(width, height, left=0, bottom=0, units='metric', draw_mode=None, filename=None):
+ return gerberex.dxf.DxfFile.rectangle(
+ width, height, left, bottom, units, draw_mode, filename)