From 94f3976915d64a77135a1fdc8983085ee8d2e1f9 Mon Sep 17 00:00:00 2001 From: Hamilton Kibbe Date: Thu, 11 Jun 2015 11:20:56 -0400 Subject: Add keys to statements for linking to primitives. Add some API features to ExcellonFile, such as getting a tool path length and changing tool parameters. Excellonfiles write method generates statements based on the drill hits in the hits member, so drill hits in a generated file can be re-ordered by re-ordering the drill hits in ExcellonFile.hits. see #30 --- gerber/primitives.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'gerber/primitives.py') diff --git a/gerber/primitives.py b/gerber/primitives.py index bdd49f7..00ecb12 100644 --- a/gerber/primitives.py +++ b/gerber/primitives.py @@ -36,11 +36,13 @@ class Primitive(object): Rotation of a primitive about its origin in degrees. Positive rotation is counter-clockwise as viewed from the board top. """ - def __init__(self, level_polarity='dark', rotation=0, units=None): + def __init__(self, level_polarity='dark', rotation=0, units=None, id=None, statement_id=None): self.level_polarity = level_polarity self.rotation = rotation self.units = units self._to_convert = list() + self.id = id + self.statement_id = statement_id def bounding_box(self): """ Calculate bounding box -- cgit