Comment 8 for bug 500125

Revision history for this message
tuxcnc (662909078-eranet) wrote :

Good news !

In file UniConvertor-1.1.4/src/app/plugins/Filters/pltsaver.py
.....
 def SaveDocument(self, doc):
  left, bottom, right, top=doc.PageRect()
  inch=int(self.options['per_inch'])
  sc=inch / 72.0

  self.trafo=Trafo(sc, 0, 0, sc, 0, bottom*sc)
  self.Scale=sc
  self.inch=inch
  self.extend=map(rndtoint, tuple(self.trafo(left,bottom))
         + tuple(self.trafo(right,top)))

  # Header
  self.write_headers()
  self.SaveLayers(doc.Layers())
  self.write_terminator()
  #end
.....

I made change to sc=inch / 90.0 and compile Uniconvertor.

Now works.

I try < uniconv somefile.svg somefile.plt > and works too.

The question is, where is bug ?

In Uniconvertor because is 72 not 90 or in Inkscape because export resolution is 90 not 72 ?

Maybe patched Uniconvertor will not work properly with files from others programs ?

Now :

1. There is 0,1 mm added to both dimensions of objets of opened or imported .plt files.
    It is from "simplification threshold", I suppose, but I have no idea how fix it.