summaryrefslogtreecommitdiff
path: root/gerbonara/rs274x.py
diff options
context:
space:
mode:
Diffstat (limited to 'gerbonara/rs274x.py')
-rw-r--r--gerbonara/rs274x.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/gerbonara/rs274x.py b/gerbonara/rs274x.py
index 5ef93dd..6620f10 100644
--- a/gerbonara/rs274x.py
+++ b/gerbonara/rs274x.py
@@ -544,9 +544,11 @@ class GraphicsState:
yield '%LPD*%' if polarity_dark else '%LPC*%'
def set_aperture(self, aperture):
- if self.aperture != aperture:
+ ap_id = self.aperture_map[id(aperture)]
+ old_ap_id = self.aperture_map.get(id(self.aperture), None)
+ if ap_id != old_ap_id:
self.aperture = aperture
- yield f'D{self.aperture_map[id(aperture)]}*'
+ yield f'D{ap_id}*'
def set_current_point(self, point, unit=None):
point_mm = MM(point[0], unit), MM(point[1], unit)