From ac66fd9d6b3561c1a0fb52ac2e196157bcf5f4fd Mon Sep 17 00:00:00 2001 From: jaseg Date: Thu, 3 Feb 2022 01:02:45 +0100 Subject: More doc! --- gerbonara/graphic_objects.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gerbonara/graphic_objects.py') 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) -- cgit