diff --git a/kibot/fil_rot_footprint.py b/kibot/fil_rot_footprint.py index 71927d1c..31c98edb 100644 --- a/kibot/fil_rot_footprint.py +++ b/kibot/fil_rot_footprint.py @@ -65,6 +65,14 @@ def __init__(self, regex=None, angle=None, offset_x=None, offset_y=None): if offset_y is not None: self.offset_y = offset_y + def __str__(self): + res = f'{self.field} matches {self.regex} =>' + if self.apply_angle: + res += f' rotate {self.angle}' + if self.apply_offset: + res += f' move {self.offset_x},{self.offset_y}' + return res + def config(self, parent): super().config(parent) if not self.field: @@ -177,6 +185,13 @@ def config(self, parent): self._offset.append(Regex(regex=compile(regex_str), offset_x=offset[0], offset_y=offset[1])) if not self._rot and not self._offset: raise KiPlotConfigurationError("No rotations and/or offsets provided") + if GS.debug_level > 2: + logger.debug('Final rotations list:') + for r in self._rot: + logger.debug(r) + logger.debug('Final offsets list:') + for r in self._offset: + logger.debug(r) self.rot_fields = self.force_list(self.rot_fields, default=DEFAULT_ROT_FIELDS) self.offset_fields = self.force_list(self.offset_fields, default=DEFAULT_OFFSET_FIELDS)