X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=share%2Fextensions%2Fdxf_outlines.py;h=6dd0de4774c04b17a586c65dbab9c09214621734;hb=d550d7e550171072cd9170dbd75f2cbc7605b345;hp=9c0ec35573f4e084339f30bc0942642fa3058b1c;hpb=8680124aec2da49c3e34695c68840387511f78bf;p=inkscape.git diff --git a/share/extensions/dxf_outlines.py b/share/extensions/dxf_outlines.py index 9c0ec3557..6dd0de477 100755 --- a/share/extensions/dxf_outlines.py +++ b/share/extensions/dxf_outlines.py @@ -58,6 +58,7 @@ class MyEffect(inkex.Effect): inkex.Effect.__init__(self) self.OptionParser.add_option("-R", "--ROBO", action="store", type="string", dest="ROBO") self.OptionParser.add_option("-P", "--POLY", action="store", type="string", dest="POLY") + self.OptionParser.add_option("--units", action="store", type="string", dest="units") self.OptionParser.add_option("--tab", action="store", type="string", dest="tab") self.OptionParser.add_option("--inputhelp", action="store", type="string", dest="inputhelp") self.dxf = [] @@ -236,7 +237,9 @@ class MyEffect(inkex.Effect): self.dxf_add(" 0\nLAYER\n 5\n%x\n100\nAcDbSymbolTableRecord\n100\nAcDbLayerTableRecord\n 2\n%s\n 70\n0\n 6\nCONTINUOUS\n" % (i + 80, self.layers[i])) self.dxf_add(dxf_templates.r14_style) - scale = 25.4/90.0 + scale = eval(self.options.units) + if not scale: + scale = 25.4/90 h = inkex.unittouu(self.document.getroot().xpath('@height', namespaces=inkex.NSS)[0]) self.groupmat = [[[scale, 0.0, 0.0], [0.0, -scale, h*scale]]] doc = self.document.getroot()