Problem exporting .DXF in version 23.02

Here everybody can post his problems with PhotoLine
maho
Mitglied
Posts: 80
Joined: Sun 18 May 2003 02:02

Problem exporting .DXF in version 23.02

Post by maho »

Dear Gerhard et al,

I am using PL to open a .SVG file and export a .DXF file, for the purpose of driving a CNC Laser Cutter.

The Laser Cutter was working perfectly with the PL generated files until yesterday - then it stopped working completely. Yesterday was when I upgraded from PL23.01 to PL23.02. After several hours of checking everything else, I suspect the upgrade caused the .DXF files to not be accepted by the Laser Cutter.

I ran the following test:

1) On Windows 10 PC, opened a .SVG file in PL23.02, exported to .DXF
2) On Mac OSX, opened the same .SVG file in PL23.01, exported to .DXF

I ran a filemerge on the two .DXF files - they differ by a small amount. It looks like some of the polygon coordinates were rounded off by 0.01, in dozens of places in the file. EG

Windows

Code: Select all

VERTEX
  8
Poly
  10
7.77
  20
6078.56
  0
Mac:

Code: Select all

VERTEX
  8
Poly
  10
7.77
  20
6078.55
  0
Can you confirm that there was a change in .DXF export from version 23.01 to 23.02?

If you can make Windows version 23.01 available, I can test that as well.

Thanks for your help!
User avatar
shijan
Mitglied
Posts: 1193
Joined: Mon 23 Dec 2019 15:21
Location: Ukraine

Re: Problem exporting .DXF in version 23.02

Post by shijan »

Maybe it is somehow related to changes in document DPI? As i remember there where some changes handle default DPI for document if there is no document setting available in source file. DXF export quality in PhotoLine depends a lot of resolution and DPI.
DXF is rather new format in PhotoLine and there where a lot of changes. So it could be that it still under development.

I wonder why use DXF? DXF in PhotoLine is rather simplified. It export polygonal shapes instead of real vector arcs. For my opinion this may be not precise enough for CNC machines. Why don't use some dedicated converter or proper CAD app to convert .SVG to "real" arcs-based DXF format? Or use CNC app that can support natively something like PDF format
PhotoLine UI Icons Customization Project: https://www.pl32.com/forum3/viewtopic.php?f=3&t=6302
maho
Mitglied
Posts: 80
Joined: Sun 18 May 2003 02:02

Re: Problem exporting .DXF in version 23.02

Post by maho »

Hi shijan, thanks for your reply.

You could be on to something. My original .SVG was specified entirely in pixels - but I designed it to be 300 dots per inch, and that's exactly how it cut the first time.

It seems that Laser Cutters (or perhaps just ours) is very sensitive to objects that go outside their intended bounding rectangle. Maybe it's having trouble with fractional pixels.

Is there a way to round off every vector point to its nearest pixel value?

DXF may be new to PL but it is by no means a new format(1982). I don't know how well it's documented or standardized. It's possible that different devices and software may interpret the same .DXF differently.

As to why I am using DXF in the first place - that is all our LaserCut53 software can import.
User avatar
Gerhard Huber
Entwickler
Entwickler
Posts: 4001
Joined: Mon 18 Nov 2002 15:30
Location: Bad Gögging

Re: Problem exporting .DXF in version 23.02

Post by Gerhard Huber »

I had a look on the source code of DXF-Export right now.
There was no change in the code since version 23.00.
But since DXF is text based, it is possible, that changes in our string class can have little effects.

It is no problem for your laser cutter that PhotoLine doesn't save curves - it's just what the laser cutter does, it will do lines only. But you have to create the file in the correct resolution. DXF is not new in PhotoLine, it's in the code since more then 10 years.

Back to your problem.
Your file example shows no problem (little changes in the last digit of float values are no real changes).
Does your laser cutter accept one of the files and not the other?

I sent a link to version 23.01 by email. Please send our upload a dxf file that works and the same from version 23.02 that doesn't work. It would be easier for me to find the problem.
maho
Mitglied
Posts: 80
Joined: Sun 18 May 2003 02:02

Re: Problem exporting .DXF in version 23.02

Post by maho »

Thank you Gerhard for looking in to this issue. I did some more tests today with the Laser Cutter, and this is what I found.

First, took a Windows 10 laptop and installed PL23.01 and PL23.02. Opened the source SVG file, converted text to vector, and exported a DXF from each. Ran a filemerge on the two versions - they are IDENTICAL.

On a Mac running PL23.01, opened the source SVG file, converted text to vector, and exported a DXF file. This DXF is SLIGHTLY DIFFERENT from those produced by the Windows versions of PL. Very small differences in the coordinates of the points, in dozens of places.

None of the files would work with our Laser Cutter. So I am 90% certain now that the Laser Cutter software is at fault.

So sorry for suggesting that PL was at fault; it almost certainly isn't! But you providing PL23.01 really helped me narrow down the problem, so thanks for that.

If you are still curious, here are the files:

Original SVG
Windows DXF
Mac DXF