From 1dc02d905eff59f3091744d49feea9bc346ecb71 Mon Sep 17 00:00:00 2001 From: Mario Voigt Date: Sat, 23 Oct 2021 23:10:32 +0200 Subject: [PATCH] small fixes --- .../apply_transformations/apply_transformations.py | 2 +- .../fablabchemnitz/laser_check/laser_check.py | 13 +++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/extensions/fablabchemnitz/apply_transformations/apply_transformations.py b/extensions/fablabchemnitz/apply_transformations/apply_transformations.py index e6756785..5dc96e91 100644 --- a/extensions/fablabchemnitz/apply_transformations/apply_transformations.py +++ b/extensions/fablabchemnitz/apply_transformations/apply_transformations.py @@ -190,7 +190,7 @@ class ApplyTransformations(inkex.EffectExtension): elif element.tag in [inkex.addNS('rect', 'svg'), inkex.addNS('text', 'svg'), inkex.addNS('image', 'svg')]: - node.attrib['transform'] = str(transf) + element.attrib['transform'] = str(transf) inkex.utils.errormsg( "Shape %s (%s) not yet supported. Not all transforms will be applied. Try Object to path first" % (element.TAG, element.get("id")) diff --git a/extensions/fablabchemnitz/laser_check/laser_check.py b/extensions/fablabchemnitz/laser_check/laser_check.py index 53a48b29..95229a78 100644 --- a/extensions/fablabchemnitz/laser_check/laser_check.py +++ b/extensions/fablabchemnitz/laser_check/laser_check.py @@ -194,25 +194,25 @@ class LaserCheck(inkex.EffectExtension): page_width = self.svg.unittouu(self.document.getroot().attrib['width']) width_height = self.svg.unittouu(self.document.getroot().attrib['height']) fmm = self.svg.unittouu(str(so.bbox_offset) + "mm") - if bbox.left > fmm: + if bbox.left >= fmm: inkex.utils.debug("left border... ok") else: - inkex.utils.debug("left border... fail") + inkex.utils.debug("left border... fail: {:0.3f} mm".format(self.svg.uutounit(bbox.left, "mm"))) - if bbox.top > fmm: + if bbox.top >= fmm: inkex.utils.debug("top border... ok") else: - inkex.utils.debug("top border... fail") + inkex.utils.debug("top border... fail: {:0.3f} mm".format(self.svg.uutounit(bbox.top, "mm"))) if bbox.right + fmm <= page_width: inkex.utils.debug("right border... ok") else: - inkex.utils.debug("right border... fail") + inkex.utils.debug("right border... fail: {:0.3f} mm".format(self.svg.uutounit(bbox.right, "mm"))) if bbox.bottom + fmm <= width_height: inkex.utils.debug("bottom border... ok") else: - inkex.utils.debug("bottom border... fail") + inkex.utils.debug("bottom border... fail: {:0.3f} mm".format(self.svg.uutounit(bbox.bottom, "mm"))) if so.checks == "check_all" or so.stroke_widths is True: @@ -384,6 +384,7 @@ class LaserCheck(inkex.EffectExtension): for nonPathShape in nonPathShapes: inkex.utils.debug("id={}".format(nonPathShape.get('id'))) + exit(0) if __name__ == '__main__': LaserCheck().run() \ No newline at end of file