svenhb / GRBL-Plotter

A GCode sender (not only for lasers or plotters) for up to two GRBL controller. SVG, DXF, HPGL import. 6 axis DRO.
https://grbl-plotter.de/
GNU General Public License v3.0
647 stars 172 forks source link

Version V1.7.1.1.a: The plotter software encountered an error while reading entities stored in blocks with inconsistent scaling ratios in the X and Y directions #375

Closed lianzaozi closed 2 months ago

lianzaozi commented 5 months ago

Version V1.7.1.1.a: The plotter software encountered an error while reading entities stored in blocks with inconsistent scaling ratios in the X and Y directions.

The different scaling ratios in the X and Y directions of the entities in the block in the dfx file can cause errors in the plotter software's reading.

The software version of the plotter used for testing is v1.7.1.1.a, and I guess this issue should exist in all versions.

1 Screenshot of CAD software

2 Screenshot of the plotter software

The dxf file used for testing 1 - (2).zip

The color display of graphics in the drawing software when reading dxf is different from what is displayed in the CAD software The display colors of the elements indicated by 1, 2, and 3 in the screenshot are different 3

svenhb commented 2 months ago

I assume the current order is wrong: now 1st I apply xy scaling to the ellipse-properties, then I calculate the ellipse points. I will try to calculate ellipse points 1st, then apply xy scaling - but it is a huge work.

lianzaozi commented 2 months ago

Firstly, obtain the coordinates before scaling, then use matrix operations to calculate the scaled coordinates, and then use the calculated coordinates to form a transformed ellipse. As I am not very familiar with programming, I can only provide you with the conclusion I have drawn after verification in CAD to provide you with an idea

svenhb commented 2 months ago

I hope now it is correct, check https://github.com/svenhb/GRBL-Plotter/blob/master/GRBL-Plotter_Setup_1731g.exe

svenhb commented 2 months ago

There is still a bug for circle with blockScaling.X != blockScaling.Y. But the fundamental problem has been found...

lianzaozi commented 2 months ago

Thank you for updating the software. I will conduct some necessary tests.

svenhb commented 2 months ago

Should be fixed now: https://github.com/svenhb/GRBL-Plotter/releases