summaryrefslogtreecommitdiff
path: root/gerberex/composition.py
diff options
context:
space:
mode:
authorMarin Mikaƫl <41113988+MarinMikael@users.noreply.github.com>2019-07-24 01:19:09 +0900
committerGitHub <noreply@github.com>2019-07-24 01:19:09 +0900
commit89b5b714c9d2e00ebcf849783fc30bada956dd59 (patch)
tree8527730c18c3f8a6b8f2df1a785b63c3189d9f00 /gerberex/composition.py
parenta33e9a16863a3a7f1a3e26717d6bcd5e7408a76a (diff)
downloadgerbonara-89b5b714c9d2e00ebcf849783fc30bada956dd59.tar.gz
gerbonara-89b5b714c9d2e00ebcf849783fc30bada956dd59.tar.bz2
gerbonara-89b5b714c9d2e00ebcf849783fc30bada956dd59.zip
Update composition.py
Add DrillSlot support to excellon composition.
Diffstat (limited to 'gerberex/composition.py')
-rw-r--r--gerberex/composition.py6
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)