diff options
author | jaseg <git@jaseg.de> | 2022-02-03 01:02:45 +0100 |
---|---|---|
committer | jaseg <git@jaseg.de> | 2022-02-03 01:02:45 +0100 |
commit | ac66fd9d6b3561c1a0fb52ac2e196157bcf5f4fd (patch) | |
tree | 35af3d6f1c0e1519ccfe40363a022a6b8d1ab494 /gerbonara/graphic_objects.py | |
parent | 18b9da86601ad95aaf7f0d3e02617a1970aaf574 (diff) | |
download | gerbonara-ac66fd9d6b3561c1a0fb52ac2e196157bcf5f4fd.tar.gz gerbonara-ac66fd9d6b3561c1a0fb52ac2e196157bcf5f4fd.tar.bz2 gerbonara-ac66fd9d6b3561c1a0fb52ac2e196157bcf5f4fd.zip |
More doc!
Diffstat (limited to 'gerbonara/graphic_objects.py')
-rw-r--r-- | gerbonara/graphic_objects.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gerbonara/graphic_objects.py b/gerbonara/graphic_objects.py index cdf593f..c29db5c 100644 --- a/gerbonara/graphic_objects.py +++ b/gerbonara/graphic_objects.py @@ -262,7 +262,8 @@ class Region(GraphicObject): def append(self, obj): if obj.unit != self.unit: - raise ValueError('Cannot append Polyline with "{obj.unit}" coords to Region with "{self.unit}" coords.') + obj = obj.converted(self.unit) + if not self.poly.outline: self.poly.outline.append(obj.p1) self.poly.outline.append(obj.p2) |