151 (edited by andrew 2025-01-19 06:33:10)

Re: New .dxf to .elmt Conversion Program

Howdy all, hope this is the correct place for bugs on DXF conversion, am playing around with doing an enclosure layout, so I grabbed a coordgrip dxf I could use off Mcmaster carr and the text is garbled to heck, may be useful for the "fun" text layout issues


Can grib dxf here since I can't upload it https://www.mcmaster.com/8302K738/

As a gift, a quick scale factor conversion sheet I made, after importing to ELMT if you know some dimension in real world units you can punch in coords of that in PX units and it will calculate scale factor based on 2px=1MM, its set in inches 'cause I'm 'Murican, but easy enough to knock the 25.4mm/inch out if needed

found best way to use is import -> save as element, measure, figure scale factor; delete contents of element, then do import and resize the element onto itself with calculated scale factor

Post's attachments

Attachment icon QTElementScaleFactor.ods 9.33 kb, 13 downloads since 2025-01-19 

Screenshot_2025-01-19_03-19-43.png, 88.72 kb, 1311 x 767
Screenshot_2025-01-19_03-19-43.png 88.72 kb, 14 downloads since 2025-01-19 

152 (edited by plc-user 2025-01-19 08:53:24)

Re: New .dxf to .elmt Conversion Program

I don't know what you are complaining about: the drawing is perfectly converted and the scale of 1mm = 2px is also correct!
And vadoola's statement is also correct: scaling of texts and their positioning still needs to be worked on.

What texts do you want to use for the front view of the element? You know the name, the part-number and the manufacturer...

Post's attachments

Attachment icon 8302K738_Wet-Location Cord Grip.dxf.zip 252.38 kb, 16 downloads since 2025-01-19 

Attachment icon 8302K738_Wet-Location Cord Grip.pdf 126.01 kb, 22 downloads since 2025-01-19 

Fragen zu QET gehören in dieses Forum und werden nicht per PM beantwortet! – Questions regarding QET belong in this forum and will NOT be answered via PM! – Les questions concernant QET doivent être posées sur ce forum et ne seront pas traitées par MP !

Re: New .dxf to .elmt Conversion Program

Hello Andrew,
thanks for your convertion spreadsheet, maybe be interesting plc-user and Vadoola

https://download.qelectrotech.org/qet/forum_img_2/andre_dxf.png

Tried with lastest vadoola github commit, same thing like you for texts.
But the drawn piece is perfectly converted. Thanks Vadoola. nomicons/wink
https://download.qelectrotech.org/qet/forum_img_2/andre_part_draw.png

"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."

Re: New .dxf to .elmt Conversion Program

I saw these fonts size was so biggest, like size= 1298 px ....

<description>
        <dynamic_text Halignment="AlignHCenter" text_width="-1" font="Arial Narrow,779,-1,0,0,0,0,0,0,0" y="210.57" frame="false" z="0" keep_visual_rotation="true" text_from="UserText" Valignment="AlignVCenter" x="187.3" rotation="0" uuid="{efa63688-1d59-4f48-b7c6-e61cac5ce680}">
            <text>2 1/2 NPT</text>
        </dynamic_text>
        <dynamic_text Halignment="AlignHCenter" text_width="-1" font="Arial Narrow,519,-1,0,0,0,0,0,0,0" y="325.1" frame="false" z="0" keep_visual_rotation="true" text_from="UserText" Valignment="AlignVCenter" x="157.78" rotation="0" uuid="{be6ff0b9-bd03-40df-9d2d-182c19e78a07}">
            <text>© 2023 McMaster-Carr Supply Company</text>
        </dynamic_text>
        <dynamic_text Halignment="AlignHCenter" text_width="-1" font="Arial Narrow,649,-1,0,0,0,0,0,0,0" y="332.53" frame="false" z="0" keep_visual_rotation="true" text_from="UserText" Valignment="AlignVCenter" x="353.73" rotation="0" uuid="{cf71a1f6-e8f6-468e-9a03-fc9026ffb867}">
            <text>Cord Grip</text>
        </dynamic_text>
        <dynamic_text Halignment="AlignHCenter" text_width="-1" font="Arial Narrow,649,-1,0,0,0,0,0,0,0" y="316.3" frame="false" z="0" keep_visual_rotation="true" text_from="UserText" Valignment="AlignVCenter" x="354.07" rotation="0" uuid="{3042b1a4-c128-4152-9e52-7059ad56692c}">
            <text>Wet-Location</text>
        </dynamic_text>
        <dynamic_text Halignment="AlignHCenter" text_width="-1" font="Arial Narrow,1298,-1,0,0,0,0,0,0,0" y="286.92" frame="false" z="0" keep_visual_rotation="true" text_from="UserText" Valignment="AlignVCenter" x="370.46" rotation="0" uuid="{bb0c5380-9eb0-4539-a6ba-e6747f8200e8}">
            <text>8302K738</text>
        </dynamic_text>
        <dynamic_text Halignment="AlignHCenter" text_width="-1" font="Arial Narrow,390,-1,0,0,0,0,0,0,0" y="339.87" frame="false" z="0" keep_visual_rotation="true" text_from="UserText" Valignment="AlignVCenter" x="159.08" rotation="0" uuid="{80473fb0-b6c7-44f1-9ad5-ef7252fb981a}">
            <text>Information in this drawing is provided for reference only.</text>
        </dynamic_text>
        <dynamic_text Halignment="AlignHCenter" text_width="-1" font="Arial Narrow,519,-1,0,0,0,0,0,0,0" y="288.12" frame="false" z="0" keep_visual_rotation="true" text_from="UserText" Valignment="AlignVCenter" x="275.08" rotation="0" uuid="{c0f52eaf-f682-4c51-8acc-94f969a7314c}">
            <text>PART</text>
        </dynamic_text>
        <dynamic_text Halignment="AlignHCenter" text_width="-1" font="Arial Narrow,519,-1,0,0,0,0,0,0,0" y="297.72" frame="false" z="0" keep_visual_rotation="true" text_from="UserText" Valignment="AlignVCenter" x="276.03" rotation="0" uuid="{5de7a2d5-516d-4d82-ac48-a286a2614338}">
            <text>NUMBER</text>
        </dynamic_text>
        <dynamic_text Halignment="AlignHCenter" text_width="-1" font="Arial Narrow,519,-1,0,0,0,0,0,0,0" y="313.47" frame="false" z="0" keep_visual_rotation="true" text_from="UserText" Valignment="AlignVCenter" x="157.18" rotation="0" uuid="{4ce33b0a-4f95-43cf-bb60-4f832b127733}">
            <text>http://www.mcmaster.com</text>

https://download.qelectrotech.org/qet/forum_img_2/andre_dxf.png
If I divide the size of all the fonts by ~100, the appearance and positioning are quite good.


https://download.qelectrotech.org/qet/forum_img_2/andre_elmt-divide_text_font.png


https://download.qelectrotech.org/qet/forum_img_2/andre_elmt-divide_text_font2.png


Edit: for this DXF file the fonts was so big, but I tried other DXF files and fonts seem's good.

Post's attachments

Attachment icon test-def.elmt 169.02 kb, 21 downloads since 2025-01-19 

"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."

155 (edited by andrew 2025-01-19 15:08:31)

Re: New .dxf to .elmt Conversion Program

plc-user wrote:

I don't know what you are complaining about: the drawing is perfectly converted and the scale of 1mm = 2px is also correct!
And vadoola's statement is also correct: scaling of texts and their positioning still needs to be worked on.

What texts do you want to use for the front view of the element? You know the name, the part-number and the manufacturer...


No complaints sir, I am happy and thankful for the work on the importer and your resizer. I only bring it up because the text issue was mentioned and I saw the issues on the USA based DXFs I tried which leads me to wonder if they have a 3rd party backend generating these and if so fixing may be worth it. (as it would affect a ton of these DXFs)

Also if it's prescaled, I wonder if prev document I converted from DWG->DXF->Element was messed up or if I did some dragging around 1st by mistake

@Scorpio810, I may have to look into file format, but I assume the DXF has font size and QET has font size, so can't we get a porportion based on doc size and then just hit the font sizes with that (rounded as needed)

Re: New .dxf to .elmt Conversion Program

@Andrew: The Vadoola code shown here may be of interest to you:
https://github.com/qelectrotech/new_dxf … d.rs#L1165

"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."

Re: New .dxf to .elmt Conversion Program

New packages build based of Vadoola commit: 4ecce24

See https://qelectrotech.org/forum/viewtopi … 827#p20827

Post's attachments

Attachment icon linux64_dxf2elmt.tar.gz 1.38 mb, 10 downloads since 2025-01-19 

Attachment icon macOS_arm64-dxf2emt.zip 1.26 mb, 2 downloads since 2025-01-25 

Attachment icon macOS_intel-dxf2elmt.zip 1.29 mb, 11 downloads since 2025-01-19 

Attachment icon Win_64_dxf2elmt.zip 1.36 mb, 18 downloads since 2025-01-19 

"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."

Re: New .dxf to .elmt Conversion Program

Let's not guess what might be wrong with the fonts, but wait for Vadoola's answer when he has looked at the dxf and the resulting element-file!

andrew wrote:

(...) I wonder if prev document I converted from DWG->DXF->Element was messed up (...)

I'm also not asking why you took the additional conversion route via dwg when there is a dxf available from the supplier that can be converted directly. I achieved the perfect results I described in the post above (https://qelectrotech.org/forum/viewtopi … 822#p20822) - with Vadoolas latest code and without any additional scaling!
In any case, the downloaded dxf is attached to that post, too.

Fragen zu QET gehören in dieses Forum und werden nicht per PM beantwortet! – Questions regarding QET belong in this forum and will NOT be answered via PM! – Les questions concernant QET doivent être posées sur ce forum et ne seront pas traitées par MP !

Re: New .dxf to .elmt Conversion Program

plc-user wrote:

Let's not guess what might be wrong with the fonts, but wait for Vadoola's answer when he has looked at the dxf and the resulting element-file!

I'm also not asking why you took the additional conversion route via dwg when there is a dxf available from the supplier that can be converted directly. I achieved the perfect results I described in the post above

No worries, if I get time later I may run the conversion in debugger and trace code myself, Scorpio810 showed me where to start.

As for the DWG conversion, completely different item from different vendor that had DWG only, I'll try reimporting from the DWG and see if it scales correctly later, not relavent to the text issue, but I wanted to include my sheet in case it could help anyone else with conversions (maybe rescaling existing wrong scaled drawings)

Re: New .dxf to .elmt Conversion Program

Lots to respond to...

andrew wrote:

Howdy all, hope this is the correct place for bugs on DXF conversion

The QET Forums, either this thread or creating a new one, are probably the best place for this. I do use Github Issues (https://github.com/Vadoola/dxf2elmt/issues) for tracking problems or enhancements etc., but if you make a post here, there can be a bit more discussion about it and I can make an Issue on Github, you are more then welcome to make a Github Issue as well though.


Thanks for the spreadsheet, I can take a look at it. The scaling should be in there already, but only recently and includes all the units supported by DXF. The code can be seen here: https://github.com/Vadoola/dxf2elmt/blo … od.rs#L213. Perhaps you grabbed a slightly older version of the conversion utility, because I only checked in that code a few days ago.

andrew wrote:

its set in inches 'cause I'm 'Murican

Now worries, I to am 'Murican, but have been living in New Zealand (where my wife is from) for a while now, that's why I'm late to the party here, I was asleep for most of this conversation.

andrew wrote:

and the text is garbled to heck

Yeah there is still quite a bit of work to do on the text but I'm slowly chipping away at it.
There are multiple text types in DXF
    * ArcAlignedText
    * MText
    * RText
    * Text
Right now Text should be somewhat well supported, but there are issues. MText has some very early and crude support, and the other two have no support. Just looking at the screenshot you shared (without having looked at the DXF yet) I'm guessing these are regular "Text" objects.

scorpio810 wrote:

I saw these fonts size was so biggest, like size= 1298 px ....

andrew wrote:

@Scorpio810, I may have to look into file format, but I assume the DXF has font size and QET has font size, so can't we get a porportion based on doc size and then just hit the font sizes with that (rounded as needed)

A font size of 1298 certainly seems wrong, I'll have to do some testing on that file to see what's going on. The DXF actually stores font height in drawing units, so if the drawing defaults to inches, the text height will be stored in inches not font points. I convert between real world units and font points at the code Laurent linked above and round it to a whole number. The conversion is based on the definition of a PostScript font point where 1pt is defined as 1/72 of an inch, and in my testing so far this seems to work well.

andrew wrote:

Also if it's prescaled, I wonder if prev document I converted from DWG->DXF->Element was messed up or if I did some dragging around 1st by mistake

It's certainly possible and hard to know. I'll take a closer look at the dxf and see what I can find, it might be a couple of days before I can get to it though.

Re: New .dxf to .elmt Conversion Program

The font sizes should be correct in the latest commit (c3a5b2a). Before I had the real world units to Pt logic, I just scaled the text by the same scaling factor as the rest of the drawing as a temporary measure. I forgot to remove that code, so it was scaling it twice, once when converting between real world units and font points, and then again by the same factor the rest of the drawing was.

The handful of drawings I was using were in mm, so the extra scaling was 2x, but the drawing you were using was in inches, so the extra scaling was 50.8x.

There are still some other issues, with the text in that drawing for example in dxf the X and Y coordinates are based off alignment, in QET, they are always left and top regardless of alignment. So I need to add logic to do font measurements and that sort of thing. for this reason some of the text in the dxf is slightly off where it should be. Fixing is one of he things I was already starting to work on, but is more complicated, and will take a bit longer.

162

Re: New .dxf to .elmt Conversion Program

good day. Even though I click on the "installation folder" to convert the dxf file, it does not open. So I created my own folder and added "binary/dxf2elmt" into it. Even though I enter the program and click on the "installation file" again with the mouse, it does not open. Can anyone help?


-------------------------------------
''Sorry if there was any mistake in the translation, I did it with google translate.''

Post's attachments

1.jpg, 134.2 kb, 1360 x 768
1.jpg 134.2 kb, 11 downloads since 2025-01-21 

2.jpg, 117.29 kb, 1360 x 768
2.jpg 117.29 kb, 10 downloads since 2025-01-21 

Attachment icon 3.mp4 853.63 kb, 17 downloads since 2025-01-21 

163 (edited by plc-user 2025-01-22 16:23:57)

Re: New .dxf to .elmt Conversion Program

lanet wrote:

good day. Even though I click on the "installation folder" to convert the dxf file, it does not open. So I created my own folder and added "binary/dxf2elmt" into it. Even though I enter the program and click on the "installation file" again with the mouse, it does not open. Can anyone help?'

In the sources of QET one can find, that the "installation folder" is this one on windows:

(QDir::homePath() + QStringLiteral("/Application Data/qet/binary"))

should resolve to:

c:/users/$YourUserName/Application Data/qet/binary

Maybe a permission-problem?

Fragen zu QET gehören in dieses Forum und werden nicht per PM beantwortet! – Questions regarding QET belong in this forum and will NOT be answered via PM! – Les questions concernant QET doivent être posées sur ce forum et ne seront pas traitées par MP !

Re: New .dxf to .elmt Conversion Program

Hallo plc-user: what do you think about this issue? . I'm think that very strange!!!
https://github.com/qelectrotech/qelectr … issues/325


@lanet: in principe the right path is  C:\users\your_name\AppData\Roaming\qet\binary\  under Windows.

BTW, if you use last 0.100-dev and my new packages of dxf2elmt of vadoola fork, you can saw a popup error if conversion DXF fail.

https://qelectrotech.org/forum/viewtopi … 828#p20828

Best regards,
laurent


@lanet Edit: maybey ou could  share your DXF file, you want convert?

"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."

165 (edited by plc-user 2025-01-23 09:33:33)

Re: New .dxf to .elmt Conversion Program

Salut Laurent !

scorpio810 wrote:

Hallo plc-user: what do you think about this issue? . I'm think that very strange!!!
https://github.com/qelectrotech/qelectr … issues/325

Sounds very similar...

In my opinion we should use a configuration path that can be read from qt-library-functions like "QStandardPaths::AppConfigLocation" or so.
Found the information here: https://doc.qt.io/qt-6/qstandardpaths.html

Than we won't need to set the path hardcoded individually for every system.

Maybe you can test this code-fragment, Laurent?
I know you can compile for different systems... nomicons/wink

#include <QStandardPaths>

QMessageBox msgBox;
QStringList lolo = QStandardPaths::standardLocations(QStandardPaths::AppConfigLocation) ;
msgBox.setInformativeText(lolo.join("\n"));
msgBox.setText("QStringList returned by QStandardPaths::standardLocation");
msgBox.exec();

On my Debian unstable it shows this output:

QStringList returned by QStandardPaths::standardLocation

/home/ich/.config/QElectroTech/QElectroTech
/etc/QElectroTech/QElectroTech
/etc/xdg/QElectroTech/QElectroTech
/usr/share/QElectroTech/QElectroTech

EDIT:
Just found this:

QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation)

It returns this:

/home/ich/.config/QElectroTech/QElectroTech

EDIT 2:
I was a bit confused about the double "QElectroTech" in the path, but reading the docs helps!
It results from the settings in main.cpp:

    QCoreApplication::setOrganizationName("QElectroTech");
    QCoreApplication::setOrganizationDomain("qelectrotech.org");
    QCoreApplication::setApplicationName("QElectroTech");

We have to keep in mind that such a modification would affect more, than just the execution of dxf2elmt and/or QET_ElementScaler!
It would be necessary to look at more parts of QET-sourcecode where the configuration directory is also used: settings, collections, titleblocks, etc.

Fragen zu QET gehören in dieses Forum und werden nicht per PM beantwortet! – Questions regarding QET belong in this forum and will NOT be answered via PM! – Les questions concernant QET doivent être posées sur ce forum et ne seront pas traitées par MP !

Re: New .dxf to .elmt Conversion Program

Hallo plc-user,

this patch send me in log file these informations:

--- sources/machine_info.cpp
+++ sources/machine_info.cpp
@@ -27,6 +27,7 @@
 #include <QStorageInfo>
 #include <QLibraryInfo>
 #include <QStorageInfo>
+#include <QStandardPaths>
 
 #ifdef Q_OS_WIN
 #include <windows.h>
@@ -144,6 +145,12 @@ void MachineInfo::send_info_to_debug()
           + "  - " + pc.cpu.Architecture
           + " - Version : "+pc.os.name
           + " - Kernel : "+pc.os.kernel;
+    qInfo()<< " Standard Location :"<< QStringList(QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation));
+    qInfo()<< " AppLocal Data Location:"<< QStandardPaths::writableLocation(QStandardPaths::ApplicationsLocation);
+    qInfo()<<" Home Location:"<< QStandardPaths::writableLocation(QStandardPaths::HomeLocation);
+    qInfo()<<" Runtime Location:"<< QStandardPaths::writableLocation(QStandardPaths::RuntimeLocation);
+    
+    
     qInfo()<< "*** Qt screens ***";
 
     for (int ii = 0; ii < pc.screen.count; ++ii) {
@@ -411,3 +418,4 @@ QString MachineInfo::compilation_info()
     }
     return compilation_info;
 }
+

11:11:35.986 Info: "Built with Qt 5.15.15 - x86_64 - Date : Jan 23 2025 : 11:11:32"
11:11:35.986 Info: "Run with Qt 5.15.15 using 48 thread(s)"
11:11:35.986 Info: "CPU : model name\t: AMD Ryzen Threadripper 3960X 24-Core Processor\n"
11:11:35.986 Info: "RAM Total : 64 GB"
11:11:35.986 Info: "RAM Available : 56 GB"
11:11:35.986 Info: "GPU :  Advanced Micro Devices, Inc. [AMD/ATI] Navi 22 [Radeon RX 6700/6700 XT/6750 XT / 6800M/6850M XT] (rev df)\n"
11:11:35.986 Info: "GPU RAM :     Video memory: 10240MB\n    Dedicated video memory: 10240 MB\n    Currently available dedicated video memory: 7557 MB\n"
11:11:35.986 Info: "OS : linux  - x86_64 - Version : Debian GNU/Linux trixie/sid - Kernel : 6.12.10-amd64"
11:11:35.986 Info:  Standard Location : ("/home/laurent/.config/QElectroTech/QElectroTech")
11:11:35.986 Info:  AppLocal Data Location: "/home/laurent/.local/share/applications"
11:11:35.986 Info:  Home Location: "/home/laurent"
11:11:35.986 Info: :Runtime Location: "/run/user/1000"

11:11:35.986 Info: *** Qt screens ***
11:11:35.986 Info: "( 1 : 1920 x 1080 )"
11:11:35.986 Info: "( 2 : 4388 x 2468 )"
11:11:35.987 Info: DISK : /run   
11:11:35.987 Info: FileSystemType: "tmpfs"
........................................
couic!

"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."

Re: New .dxf to .elmt Conversion Program

Salut Laurent !

Thank you for the reply!

Can you compile and test the code also on/for win and macos?
After some more reading:
It would be interesting to find the standard-directories on the systems for Application-Config and Application-Data.
So in my opinion we should use

QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation)

for our configuration and

QStandardPaths::writableLocation(QStandardPaths::AppDataLocation)

for additional binaries, collections, titleblocks, log-files, etc.
At first sight it should be quite easy to change the default-locations for config and data.
Transition for the users might be a challenge...

Fragen zu QET gehören in dieses Forum und werden nicht per PM beantwortet! – Questions regarding QET belong in this forum and will NOT be answered via PM! – Les questions concernant QET doivent être posées sur ce forum et ne seront pas traitées par MP !

Re: New .dxf to .elmt Conversion Program

Remember to find KAutoSaveFile::allStaleFiles PATH also.

"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."

Re: New .dxf to .elmt Conversion Program

scorpio810 wrote:

Remember to find KAutoSaveFile::allStaleFiles PATH also.

Where do I find those files, if they exist on the system?
Can I force QET to produce a "StaleFile"?

Fragen zu QET gehören in dieses Forum und werden nicht per PM beantwortet! – Questions regarding QET belong in this forum and will NOT be answered via PM! – Les questions concernant QET doivent être posées sur ce forum et ne seront pas traitées par MP !

170 (edited by scorpio810 2025-01-24 11:46:08)

Re: New .dxf to .elmt Conversion Program

Hallo plc-user
Have not time, but quickly make an little commit: https://github.com/qelectrotech/qelectr … 4dd909284f

OS : linux  - x86_64 - Version : Debian GNU/Linux trixie/sid

6:36:00.197 Info: "Compilation : GCC 14.2.0"
16:36:00.197 Info: "Built with Qt 5.15.15 - x86_64 - Date : Jan 23 2025 : 16:35:56"
16:36:00.197 Info: "Run with Qt 5.15.15 using 48 thread(s)"
16:36:00.197 Info: "CPU : model name\t: AMD Ryzen Threadripper 3960X 24-Core Processor\n"
16:36:00.197 Info: "RAM Total : 64 GB"
16:36:00.197 Info: "RAM Available : 57 GB"
16:36:00.197 Info: "GPU :  Advanced Micro Devices, Inc. [AMD/ATI] Navi 22 [Radeon RX 6700/6700 XT/6750 XT / 6800M/6850M XT] (rev df)\n"
16:36:00.197 Info: "GPU RAM :     Video memory: 10240MB\n    Dedicated video memory: 10240 MB\n    Currently available dedicated video memory: 8845 MB\n"
16:36:00.197 Info: "OS : linux  - x86_64 - Version : Debian GNU/Linux trixie/sid - Kernel : 6.12.10-amd64"
16:36:00.197 Info:  System language: "fr"
16:36:00.197 Info:  language Path: "/usr/local/share/qelectrotech/lang/"
16:36:00.197 Info:  Common Elements Dir: "/usr/local/share/qelectrotech/elements/"
16:36:00.197 Info:  Common TitleBlock Templates Dir: "/usr/local/share/qelectrotech/titleblocks/"
16:36:00.197 Info:  Custom Elements Dir: "/home/laurent/.qet/elements/"
16:36:00.197 Info:  Custom TitleBlock Templates Dir: "/home/laurent/.qet/titleblocks/"
16:36:00.197 Info:  Company Elements Dir: "/home/laurent/.qet/elements-company/"
16:36:00.197 Info:  Company TitleBlock Templates Dir: "/home/laurent/.qet/titleblocks-company"

16:36:00.197 Info:  Standard Location : ("/home/laurent/.config/QElectroTech/QElectroTech")
16:36:00.197 Info:  App Data Location: "/home/laurent/.local/share/QElectroTech/QElectroTech"
16:36:00.197 Info:  App Local DataLocation: "/home/laurent/.local/share/applications"
16:36:00.197 Info:  Home Location: "/home/laurent"
16:36:00.197 Info:  Runtime Location: "/run/user/1000"
16:36:00.197 Info:  Cache Location: "/home/laurent/.cache/QElectroTech/QElectroTech"


Edit macOS arm64

10:34:19.164 Info: "GitRevision b19fbd25224ab1286e22432fb35bcc10c092eb44" 
10:34:19.164 Info: "QElectroTech V 0.100.0-dev" 
10:34:19.164 Info: "Compilation : CLANG 14.0.0 (clang-1400.0.29.102)" 
10:34:19.164 Info: "Built with Qt 5.15.15 - arm64 - Date : Jan 24 2025 : 10:26:19" 
10:34:19.165 Info: "Run with Qt 5.15.15 using 8 thread(s)" 
10:34:19.165 Info: "CPU : Apple M2\n" 
10:34:19.165 Info: "RAM Total : 8 GB" 
10:34:19.165 Info: "" 
10:34:19.165 Info: "GPU : " 
10:34:19.165 Info: "GPU RAM : " 
10:34:19.165 Info: "OS : darwin  - arm64 - Version : macOS 14.7 - Kernel : 23.6.0" 
10:34:19.165 Info:  System language: "fr" 
10:34:19.165 Info:  language Path: "/Applications/qelectrotech.app/Contents/MacOS/./../Resources/lang/" 
10:34:19.165 Info:  Common Elements Dir: "/Applications/qelectrotech.app/Contents/MacOS/./../Resources/elements/" 
10:34:19.165 Info:  Common TitleBlock Templates Dir: "/Applications/qelectrotech.app/Contents/MacOS/./../Resources/titleblocks/" 
10:34:19.165 Info:  Custom Elements Dir: "/Users/laurent/.qet/elements/" 
10:34:19.165 Info:  Custom TitleBlock Templates Dir: "/Users/laurent/.qet/titleblocks/" 
10:34:19.165 Info:  Company Elements Dir: "/Users/laurent/.qet/elements-company/" 
10:34:19.165 Info:  Company TitleBlock Templates Dir: "/Users/laurent/.qet/titleblocks-company/" 
10:34:19.165 Info:  Standard Location : ("/Users/laurent/Library/Preferences/QElectroTech/QElectroTech") 
10:34:19.165 Info:  App Data Location: "/Users/laurent/Library/Application Support/QElectroTech/QElectroTech" 
10:34:19.165 Info:  App Local DataLocation: "/Users/laurent/Applications" 
10:34:19.165 Info:  Home Location: "/Users/laurent" 
10:34:19.165 Info:  Runtime Location: "/Users/laurent/Library/Application Support" 
10:34:19.165 Info:  Cache Location: "/Users/laurent/Library/Caches/QElectroTech/QElectroTech" 
10:34:19.165 Info: *** Qt screens *** 


Edit Win10 x86-64:

07:40:19.388 Info: "QElectroTech V 0.100.0-dev" 
07:40:19.388 Info: "Compilation: GCC 13.3.0" 
07:40:19.389 Info: "Built with Qt 5.15.16 - x86_64 - Date : Jan 23 2025 : 17:39:55" 
07:40:19.391 Info: "Run with Qt 5.15.16 using 24 thread(s)" 
07:40:19.392 Info: "CPU : NAME                                            \r\r\nAMD RYZEN THREADRIPPER 3960X 24-CORE PROCESSOR  \r\r\n\r\r\n" 
07:40:19.392 Info: "RAM Total : 36 GB" 
07:40:19.393 Info: "RAM Available : 33 GB" 
07:40:19.394 Info: "GPU : VideoProcessor  \r\r\n                \r\r\n\r\r\n" 
07:40:19.395 Info: "GPU RAM : RAM Total : AdapterRAM  \r\r\n0           \r\r\n\r\r\n B" 
[b]07:40:19.397 Info: "OS : winnt  - x86_64 - Version : Windows 10 Version 2009 - Kernel : 10.0.19045" 
07:40:19.397 Info:  System language: "en" 
07:40:19.398 Info:  language Path: "C:/Program Files/QElectroTech/lang/" 
07:40:19.399 Info:  Common Elements Dir: "C:/Program Files/QElectroTech/elements/" 
07:40:19.399 Info:  Common TitleBlock Templates Dir: "C:/Program Files/QElectroTech/titleblocks/" 
07:40:19.400 Info:  Custom Elements Dir: "C:/Users/laurent/Application Data/qet/elements/" 
07:40:19.401 Info:  Custom TitleBlock Templates Dir: "C:/Users/laurent/Application Data/qet/titleblocks/" 
07:40:19.401 Info:  Company Elements Dir: "C:/Users/laurent/Application Data/qet/elements-company/" 
07:40:19.403 Info:  Company TitleBlock Templates Dir: "C:/Users/laurent/Application Data/qet/titleblocks-company/" 
07:40:19.404 Info:  Standard Location : ("C:/Users/laurent/AppData/Local/QElectroTech/QElectroTech") 
07:40:19.405 Info:  App Data Location: "C:/Users/laurent/AppData/Roaming/QElectroTech/QElectroTech" 
07:40:19.406 Info:  App Local DataLocation: "C:/Users/laurent/AppData/Roaming/Microsoft/Windows/Start Menu/Programs" 
07:40:19.406 Info:  Home Location: "C:/Users/laurent" 
07:40:19.408 Info:  Runtime Location: "C:/Users/laurent" 
07:40:19.409 Info:  Cache Location: "C:/Users/laurent/AppData/Local/QElectroTech/QElectroTech/cache" 
07:40:19.409 Info: *** Qt screens ***

@plc-user: I'm thinking if "we" can add all the data from the config file on the log file,
later it might be useful for troubleshooting users, what do you think?

BTW, on Windows OS our users don't have the config file .... All config 'stored only in registry editor: regedit!! beurk!  nomicons/gne
nomicons/wink

"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."

Re: New .dxf to .elmt Conversion Program

Salut Laurent !

scorpio810 wrote:

BTW, on Windows OS our users don't have the config file .... All config 'stored only in registry editor: regedit!! beurk!  nomicons/gne
nomicons/wink

O.k. but there will be a ConfigPath where to store some css- or json-files, I think.
Qt says on its site for win:

AppConfigLocation:
  "C:/Users/<USER>/AppData/Local/<APPNAME>"
AppDataLocation:
  "C:/Users/<USER>/AppData/Roaming/<APPNAME>"

So we need to handle the paths on all three systems!

The general configuration file of QElectroTech is completely handled by library-function "QSettings".
By default it is stored (on Linux) here:
/home/$USER/.config/$Organization/$Application.conf
So there is no need to take any action!

The stalefiles are handled by library-functions of Qt and are stored here:
/home/$USER/.local/share/stalefiles/QElectroTech/
No need to take any action!

What I found out, it should be necessary to set:

  • AppConfigLocation for:
      + style.css
      + graphics_table.json
      + element_texts_pattern
      + summary.json
      + nomenclature.json

  • AppDataLocation for:
      + LogFiles
      + elements_cache.sqlite
      + default-location for user- and company-collections
      + default-location for user- and company-titleblocks
      + additional binaries (dxf2elmt, QET_ElementScaler)

To achieve such a splitting of config and data we need to introduce a function "QETapp::dataDir()" and change the appropriate lines for the setting of Paths and Filenames.

Fragen zu QET gehören in dieses Forum und werden nicht per PM beantwortet! – Questions regarding QET belong in this forum and will NOT be answered via PM! – Les questions concernant QET doivent être posées sur ce forum et ne seront pas traitées par MP !

Re: New .dxf to .elmt Conversion Program

plc-user wrote:
scorpio810 wrote:

Remember to find KAutoSaveFile::allStaleFiles PATH also.

Where do I find those files, if they exist on the system?
Can I force QET to produce a "StaleFile"?

https://qelectrotech.org/forum/viewtopi … 072#p16072

scorpio810 wrote:

Btw, backup files is stored on ~.local/share/stalefiles/QElectroTech on Linux.
C:\Users\username\AppData\Local\stalefiles\QElectroTech on Windows
/Users/username/Library/Application Support/stalefiles/QElectroTech/ on macOS

"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."

Re: New .dxf to .elmt Conversion Program

@plc-user:It seems like a lot of work and I don't feel up to it any more.

My health is deteriorating and I find it hard to think and organise myself.

What's more, at work I suffer from not being as fit and clear-headed as I was at 40.
Perhaps this is due to the many medications I'm taking.

"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."

174 (edited by plc-user 2025-01-23 20:29:02)

Re: New .dxf to .elmt Conversion Program

Salut Laurent !

our posts overlapped in time...

scorpio810 wrote:

@plc-user:It seems like a lot of work and I don't feel up to it any more.

My health is deteriorating and I find it hard to think and organise myself.

What's more, at work I suffer from not being as fit and clear-headed as I was at 40.
Perhaps this is due to the many medications I'm taking.

Wish you all the best for your health!

Take your time to test the patch: there is no need to rush!!!

Moved post with patch to more suitable CODE-Forum:
https://qelectrotech.org/forum/viewtopic.php?id=2880

Fragen zu QET gehören in dieses Forum und werden nicht per PM beantwortet! – Questions regarding QET belong in this forum and will NOT be answered via PM! – Les questions concernant QET doivent être posées sur ce forum et ne seront pas traitées par MP !

175 (edited by plc-user 2025-01-28 18:07:59)

Re: New .dxf to .elmt Conversion Program

Back to the topic:  nomicons/smile

Hello Vadoola,

I'm not quite happy with the font sizes yet.
That's why I used Inkscape to create a drawing with different font sizes. When I realized that the fonts were exported as polygons into DXF, I used LibreCAD to add some MText in different sizes.
I then converted the DXF into an element and realized that the font sizes did not fit.
If we focus on the 20 mm font:
In LibreCAD (black background) it is good to see that both texts are the same size - I expect the same for the element.
In the element (white background), the polygon 20 mm are 40px high, but the 20 mm text has a font size of 57.
So there is still a factor of about 1.4 somewhere in there that doesn't belong.
I noticed something similar with the imperial DXF from your American compatriot.

Packed all files into attached zip.

Remark #1:
The Text-Positions ...  nomicons/wink

Remark #2:
When saving the DXF from Inkscape, the bottom edge of the rectangle was lost somewhere. That shouldn't bother you!

Post's attachments

Bildschirmfoto_2025-01-28_Fonts_in_converted_Element.png, 35.1 kb, 554 x 898
Bildschirmfoto_2025-01-28_Fonts_in_converted_Element.png 35.1 kb, 2 downloads since 2025-01-28 

Bildschirmfoto_2025-01-28_Fonts_in_LibreCAD.png, 23.44 kb, 581 x 957
Bildschirmfoto_2025-01-28_Fonts_in_LibreCAD.png 23.44 kb, 2 downloads since 2025-01-28 

Attachment icon Schriftgroessen.zip 155.72 kb, 2 downloads since 2025-01-28 

Fragen zu QET gehören in dieses Forum und werden nicht per PM beantwortet! – Questions regarding QET belong in this forum and will NOT be answered via PM! – Les questions concernant QET doivent être posées sur ce forum et ne seront pas traitées par MP !