3D box is scaled when pasted in a document with document-units != px
Migrated from: https://bugs.launchpad.net/inkscape/+bug/1431380
Steps to reproduce:
- Open Inkscape (default template)
- Create a 3D box.
- Select the box and copy it (Edit>Copy).
- Paste the box (Edit>Paste, or Edit>Paste in Place)
What happened?
The box is correctly pasted (inkscape:corner0 and inkscape:corner7 values are correct), but the copy is scaled down by the factor of px/mm (96/25.4 = 3.7795).
In the saved xml, the inkscape:perspective tag (in the defs) has clearly been scaled down. 3dpastedinplace.svg
If the Document Properties were set up for pixels, scale=1, this does not occur (noted by su~v in the comments)
Inkscape Version and Operating System:
- Inkscape 1.0alpha (746904b6, 2019-05-10) Linux Mint 19.1
- Inkscape 0.92.3 (2405546, 2018-03-11) Linux Mint 19.1
- Inkscape trunk revision 13996 Crunchbang Waldorf
- Inkscape 0.91.x revision 13734 Crunchbang Waldorf
- Inkscape 0.91+devel r14425 OS X 10.7.5
- Inkscape 0.91 r13725 OS X 10.7.5
- Inkscape 0.91 r13843 OS X 10.7.5
Not reproduced with 0.48.3.1, or when Document Units set to Px and scale set to 1.
Related issue that was fixed (3D box is positioned wrong when pasted in place): https://bugs.launchpad.net/inkscape/+bug/207268. Possibly helpful comment from it:
After cursory investigation I think this may be caused by perspectives not being duplicated correctly. A quick solution would be to put additional ID conflict resolution code in id-clashes.cpp. However, the whole premise of enumerating stuff that can conflict in id-clashes.cpp is wrong and the correct long-term solution is to make the XML tree CSS-aware so it can keep track of what references what and change IDs without breaking references.