function inkex.unittouu reports inconsistent results if Scale not equal to 1 in the Document Properties dialog
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Inkscape |
New
|
Undecided
|
Unassigned |
Bug Description
Attached is a modified version of the extension dimension.py. The purpose of the modification is to print out the value of the variable:
scale = self.unittouu(
which is the conversion factor from px to current document units.
perform three experiments:
1. load Inkscape and open the template file default_px.svg which uses inkscape:
run the extension 'Visualize Path->Dimensions' to get the result: scale = 1.0.
this is the expected result since document units are px.
2. load Inkscape and use the default template file which uses inkscape:
run the extension 'Visualize Path->Dimensions' to get the result: scale = 0.264583333328.
this is also expected since document units are mm, and the conversion factor is 25.4/96 = 0.2645833333333333.
3. now use the same document, and open the Document Properties dialog, and change Scale from 1 to 1.1.
now run the extension 'Dimensions'. The expected result is that the scale should change by about 10%. Instead the actual result is that: scale = 1.0. This is inconsistent. The unittouu scale result has apparently been reset by changing the Scale in the Document Properties dialog.
4. now change the Scale parameter in the Document Properties dialog to any value at all, and note that the unittouu scale result will always be 1 regardless of the value of Scale in the Document Properties, which is also inconsistent.
[ JFTR - this is the same issue I unsuccessfully tried to report well ahead of any affected stable release in bug #1508400. ]
-- installations.
<opinion>
Given changes in commits like rev 15590 and those recently proposed in bug #1653650, the project seems to have chosen to hard-code workarounds in a few select extensions, leaving everyone else stuck with Effect()'s partially broken (or rather: limited) unit conversions. Personally, I got so frustrated with all of this that I gave up trying to upstream other possible solutions for the underlying issue itself (in inkex.py) for further discussion/review, and am content to work on/use a different patch for inkex.py with just my local builds/
</opinion>