winder / Universal-G-Code-Sender

A cross-platform G-Code sender for GRBL, Smoothieware, TinyG and G2core.
http://winder.github.io/ugs_website/
GNU General Public License v3.0
1.88k stars 761 forks source link

Importing SVG on design sheet with wrong coordinates #2055

Closed dasarne closed 1 year ago

dasarne commented 1 year ago

Version

2.0.12

Hardware / Firmware

GRBL 1.1

What happened

The svg file "Test.svg" contains a rectangle with dimensions 50x70 mm. The coordinate origin in this file is at the bottom left. Screenshot_20221116_191304 When you import this svg file into a design, it has dimensions of 270x190 mm. The origin of the coordinates is in the upper left corner. Screenshot_20221116_191346

How to reproduce

You create a new design. Then open the file "Test.svg". The representation of the rectangle is not correct.

Operating System

Kernel: 5.15.76-1-MANJARO arch: x86_64 bits: 64 Desktop: KDE Plasma v: 5.26.2 Distro: Manjaro Linux

Anything else

No response

breiler commented 1 year ago

Thanks for the report. I found some problems with some affine transformations that doesn't calculate the size correctly. There is also a couple of problems with line objects where the properties is all zeroed out. So there is a bit to work with.

dasarne commented 1 year ago

I tried to give you an easy example file. If you are ready, give me a hint, and I'll test it again. Emo-Press Eye