diff options
author | Marin Mikaƫl <41113988+MarinMikael@users.noreply.github.com> | 2019-07-24 01:19:09 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-24 01:19:09 +0900 |
commit | 89b5b714c9d2e00ebcf849783fc30bada956dd59 (patch) | |
tree | 8527730c18c3f8a6b8f2df1a785b63c3189d9f00 | |
parent | a33e9a16863a3a7f1a3e26717d6bcd5e7408a76a (diff) | |
download | gerbonara-89b5b714c9d2e00ebcf849783fc30bada956dd59.tar.gz gerbonara-89b5b714c9d2e00ebcf849783fc30bada956dd59.tar.bz2 gerbonara-89b5b714c9d2e00ebcf849783fc30bada956dd59.zip |
Update composition.py
Add DrillSlot support to excellon composition.
-rw-r--r-- | gerberex/composition.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gerberex/composition.py b/gerberex/composition.py index 7abf090..29725ba 100644 --- a/gerberex/composition.py +++ b/gerberex/composition.py @@ -7,6 +7,7 @@ from functools import reduce from gerber.cam import FileSettings from gerber.gerber_statements import EofStmt from gerber.excellon_statements import * +from gerber.excellon import DrillSlot, DrillHit import gerberex.rs274x import gerberex.excellon import gerberex.dxf @@ -149,7 +150,10 @@ class DrillComposition(Composition): yield ToolSelectionStmt(t.number).to_excellon(self.settings) for h in self.hits: if h.tool.number == t.number: - yield CoordinateStmt(*h.position).to_excellon(self.settings) + if type(h) == DrillSlot: + yield SlotStmt(*h.start, *h.end).to_excellon(self.settings) + elif type(h) == DrillHit: + yield CoordinateStmt(*h.position).to_excellon(self.settings) for num, statement in self.dxf_statements: if num == t.number: yield statement.to_excellon(self.settings) |