diff options
author | jaseg <git@jaseg.de> | 2021-12-28 21:40:22 +0100 |
---|---|---|
committer | jaseg <git@jaseg.de> | 2021-12-28 21:40:22 +0100 |
commit | 63e1eae8d81cb7940d3547511488f8ec4acd4d1c (patch) | |
tree | c0d2ddf93d8637d0df600a320cbf9d1387860163 /gerbonara/gerber/primitives.py | |
parent | 25dd65fac05a43ef75fe75049d5b79a73a207fc0 (diff) | |
download | gerbonara-63e1eae8d81cb7940d3547511488f8ec4acd4d1c.tar.gz gerbonara-63e1eae8d81cb7940d3547511488f8ec4acd4d1c.tar.bz2 gerbonara-63e1eae8d81cb7940d3547511488f8ec4acd4d1c.zip |
WIP
Diffstat (limited to 'gerbonara/gerber/primitives.py')
-rw-r--r-- | gerbonara/gerber/primitives.py | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/gerbonara/gerber/primitives.py b/gerbonara/gerber/primitives.py index 25f8e06..d505ddb 100644 --- a/gerbonara/gerber/primitives.py +++ b/gerbonara/gerber/primitives.py @@ -38,7 +38,7 @@ class Primitive: class Line(Primitive):
- def __init__(self, start, end, aperture, polarity_dark=True, rotation=0, **meta):
+ def __init__(self, start, end, aperture=None, polarity_dark=True, rotation=0, **meta):
super().__init__(polarity_dark, rotation, **meta)
self.start = start
self.end = end
@@ -240,9 +240,6 @@ class Arc(Primitive): class Circle(Primitive):
- """
- """
-
def __init__(self, position, diameter, polarity_dark=True):
super(Circle, self).__init__(**kwargs)
validate_coordinates(position)
@@ -922,3 +919,14 @@ class TestRecord(Primitive): self.net_name = net_name
self.layer = layer
self._to_convert = ['position']
+
+class RegionGroup:
+ def __init__(self):
+ self.outline = []
+
+ def __bool__(self):
+ return bool(self.outline)
+
+ def append(self, primitive):
+ self.outline.append(primitive)
+
|