51

(193 replies, posted in Import DXF)

plc-user wrote:

In summary, it can be said that the order of the parameters is decisive for the original code.
With Vadoola's code, the call in QET would have to be adapted.

I looks like the last release and binary are dated 2022-07-21, but there was a commit on 2022-07-22 where Antonioaja switched from manually parsing command line arguments to using the clap argument parsing crate. I imagine that's where this discrepancy is coming from. I'll see what I can do to correct this. Probably no reason to update how QElectrotech is calling dxf2elmt if I can resolve the difference.

52

(193 replies, posted in Import DXF)

So I just did a quick look and test with the latest version in antonioaja's repo that I initially forked from. In order to get the XML on stdout you need to use both the

-i AND -v 

command line flags.

The -i flag turns off printing the info such as the number of elements that were converted etc, and the -v flag turns off creating the elmt file.

If you use the -i flag without the -v you get something along the lines of

XXX.elmt was created...
Now converting XXX.dxf...

If you use

dxf2elmt.exe -i -v -f mydxf.dxf

, you get the XML output to stdout.

This works the same in both my repo and antonioaja's. The choice of flags and combinations seems a bit odd to me, and I might make some changes at some point, but it does output to stdout if you set the correct cli flags.

53

(193 replies, posted in Import DXF)

Well it looks like this post sparked some conversation, good to see.

scorpio810 wrote:

No activity of Antionio since November 8, 2023 : https://github.com/antonioaja

I hope he's all right .... "

I hope so too, I know how things can get and they may just have other priorities, so despite the lack of updates, I didn't just want to assume the project was unmainted without trying to reach out.

scorpio810 wrote:

Program work well in a terminal with CLI, not when I put the binary dxf2elmt in ~.qet/binary/   and I use QET element editor
menu Import DXF, not  stdout?

So far I'm made some minimal changes, and in my tests it seems to be working, but I will admit I have not fully tested it yet, and only ran it from the command line. I thought the stdout support was added by Antionio with the -v flag. I can't think of any reason my changes would have broken that, but I'll take a look, as it's certainly possible I made a mistake.

scorpio810 wrote:

ps: size of the binary is very big after cargo build... ~57,6 Mio (60414840) (debug?)

cargo build

creates a debug build, and they can be pretty big.

cargo build --release

will create a smaller release build, and also striping the symbols as suggested by plc-user will reduce the size even more.

plc-user wrote:

What bothers me more about dxf2elmt:
The default behavior for polygons of dxf2elmt seems to be "closed=false", but for QET the default behavior is "closed=true". (see attachments)

This change to use closed=false by default was made by Antonioaja as the solution to a bug found by scorpio810. This original post about this is at https://qelectrotech.org/forum/viewtopic.php?id=2265. I'll  have to do a bit of digging to determine what the proper solution is here. If it should be closed or not, and if it should be closed, what else was going wrong with the dxf in the other thread.

54

(193 replies, posted in Import DXF)

Hello,

The dxf to elmt conversion program hasn't been updated in over a year, and has a few issues, as well as doesn't support all features of dxf.

I forked the project a couple of weeks ago and started to try and update it some. I don't know how much time I will have to dedicate to it, but I thought I would give it a go to try and fix some of the issues with it, as well as possibly try and add in some of the missing features.

I've submitted a pull request to the original project, and as of yet have heard nothing back (it has only been 1-2 weeks).

If anyone is interested in my fork you can find it at https://github.com/Vadoola/dxf2elmt.

I know QElectrotech links to the original repo, and I'm not suggesting this be updated to point to mine, as I feel like we need to give the original creator more time to respond before we declare it dead/unmaintained. I do hope to try and spend some time updating it however, and if the original author doesn't respond, at some point it might make sense to link to my updated repo.