From 89b5b714c9d2e00ebcf849783fc30bada956dd59 Mon Sep 17 00:00:00 2001 From: Marin Mikaƫl <41113988+MarinMikael@users.noreply.github.com> Date: Wed, 24 Jul 2019 01:19:09 +0900 Subject: Update composition.py Add DrillSlot support to excellon composition. --- gerberex/composition.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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) -- cgit