From 34fae0a7c2cf894117eee0b25e32726a492d25a8 Mon Sep 17 00:00:00 2001 From: jaseg Date: Mon, 3 Jul 2023 22:59:47 +0200 Subject: Fix handling of circles on outline layer --- gerbonara/graphic_primitives.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'gerbonara/graphic_primitives.py') diff --git a/gerbonara/graphic_primitives.py b/gerbonara/graphic_primitives.py index 7f0ddfa..ea8fd9f 100644 --- a/gerbonara/graphic_primitives.py +++ b/gerbonara/graphic_primitives.py @@ -212,6 +212,10 @@ class Arc(GraphicPrimitive): #: Line width of this arc. width : float + @property + def is_circle(self): + return math.isclose(self.x1, self.x2) and math.isclose(self.y1, self.y2) + def flip(self): return replace(self, x1=self.x2, y1=self.y2, x2=self.x1, y2=self.y1, cx=(self.x1 + self.cx) - self.x2, cy=(self.y1 + self.cy) - self.y2, clockwise=not self.clockwise) -- cgit