diff options
author | jaseg <git@jaseg.de> | 2022-01-21 21:15:53 +0100 |
---|---|---|
committer | jaseg <git@jaseg.de> | 2022-01-21 21:15:53 +0100 |
commit | 606e41d4b7969c1f1d0a935aa1e957631e71cd39 (patch) | |
tree | 59a28438a8d38a8cb548407389ecdd2c7399b23a /gerbonara/gerber/graphic_objects.py | |
parent | 125ef6af40307402f8c9854fae9e208573ed9d37 (diff) | |
download | gerbonara-606e41d4b7969c1f1d0a935aa1e957631e71cd39.tar.gz gerbonara-606e41d4b7969c1f1d0a935aa1e957631e71cd39.tar.bz2 gerbonara-606e41d4b7969c1f1d0a935aa1e957631e71cd39.zip |
Layer merging WIP
Diffstat (limited to 'gerbonara/gerber/graphic_objects.py')
-rw-r--r-- | gerbonara/gerber/graphic_objects.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gerbonara/gerber/graphic_objects.py b/gerbonara/gerber/graphic_objects.py index 032b562..c626ba3 100644 --- a/gerbonara/gerber/graphic_objects.py +++ b/gerbonara/gerber/graphic_objects.py @@ -62,6 +62,10 @@ class Flash(GerberObject): def tool(self, value): self.aperture = value + @property + def plated(self): + return self.tool.plated + def _with_offset(self, dx, dy): return replace(self, x=self.x+dx, y=self.y+dy) @@ -216,6 +220,10 @@ class Line(GerberObject): def tool(self, value): self.aperture = value + @property + def plated(self): + return self.tool.plated + def to_primitives(self, unit=None): conv = self.converted(unit) yield gp.Line(*conv.p1, *conv.p2, self.aperture.equivalent_width(unit), polarity_dark=self.polarity_dark) @@ -285,6 +293,10 @@ class Arc(GerberObject): def tool(self, value): self.aperture = value + @property + def plated(self): + return self.tool.plated + def _rotate(self, rotation, cx=0, cy=0): # rotate center first since we need old x1, y1 here new_cx, new_cy = gp.rotate_point(*self.center, rotation, cx, cy) |