276

(25 replies, posted in Elements)

Thank you for trying, Laurent!

I didn't think of comparing "my" file with the one you uploaded here on Sunday and have done so now. You can see the compare-result from DoubleCommander in the attached screenshot: Our binaries are amazingly identical! Amazing, because we definitely compiled on different machines and at different times. Compared a second time with "cmp" on my Debian-Box and it also says that the files are identical.

The message in your case I could imagine that the file looks like it has a file extension because of the added part after the underscore and therefore mac doesn't recognize it as an executable file? Maybe the file will be recognized when you rename it?
Does mac have an "executable-bit" for files? (chmod 744 ....)?

277

(25 replies, posted in Elements)

Just uploaded new binaries for Linux, ReactOS (win32) and macOS to github-repository:
https://github.com/plc-user/QET_Element … g/0.4beta2

maybe someone with a mac can test the new binary for mac and tell me, if it works?
as said before: I don't have any access to mac's ...
Thanks in advance!

278

(25 replies, posted in Elements)

scorpio810 wrote:

Compile work on mac's, but mirror flip on this element isn't perfect yet. nomicons/wink

The lines and polygons are flipped one-by-one!
That's why I say

useful during creation of elements

in the help of QET_ElementScaler and the README on github.

If we can limit ourselves (at least for now) to applying flipping and mirroring to individual polygons, I can definitely imagine this variant in QET as well!
In the context menu (right-click) there is also the possibility to add or remove points only for polygons.
Maybe this is a way to quickly integrate "flipping"? It seems to be needed every now and then, otherwise this thread would not exist... nomicons/wink

279

(25 replies, posted in Elements)

just uploaded new source-code:
- positions for terminals are always rounded without decimals
- when removing all terminals, the "link_type" is set to "thumbnail"

sorry, I don't have any access to mac's ...
upload of new binaries for Linux and ReactOS will follow soon.

280

(25 replies, posted in Elements)

the "-" at the "std=c++17" - option was missing...

just fixed!  nomicons/smile

281

(25 replies, posted in Elements)

the sub-directories need to exist before compiling... 
will add creation of sub-dirs in the shell-scripts later!

EDIT: DONE!   nomicons/smile

282

(25 replies, posted in Elements)

In my opinion it wasn't very hard to implement a mirror- or flip-function for QET_ElementScaler!
You need a loop to walk through the x- and y-values of a polygon to get the min- and max-values.
In a second step you loop through the x-and y-values again and calculate the new x- and y-values.

These vertical and horizontal flip-functions are implemented in the new version of QET_ElementScaler!

I do not know the internals of how polygons are saved in QET internally, but I guess it should be possible to implement this with manageable effort for someone who knows the internals...

In QET_ElementScaler it is implemented this way:

double dMin = 9.99e99;
double dMax = -9.99e99;
// first FOR-Loop for x-values:
for (loop through x-values) {
    dMin = min(actValue, dMin);
    dMax = max(actValue, dMax);
}
// second FOR-Loop for x-values:
for (loop through x-values) {
    newValue = (dMin + dMax) - actValue)
} 

It may not be the most elegant way to flip or mirror elements but it works.
I have tried this flipping / mirroring on several elements and could not find any malfunctions!  nomicons/smile

But you may try for yourself!  nomicons/wink
Create a "scaled" QET-Element and copy-paste the flipped polygon to your Element.

you may call it like this:

QET_ElementScaler --FlipPolyHorizontal -f YourElementFile.elmt
or
QET_ElementScaler --FlipPolyVertical -f YourElementFile.elmt

This results in a new element-file where ALL lines and polygons are flipped.

See post here: https://qelectrotech.org/forum/viewtopi … 808#p16808

Today I uploaded a new version of "QET_ElementScaler" to github: https://github.com/plc-user/QET_ElementScaler

This version is completely rewritten in C++, where I (like QET) use pugixml for handling the contents of the element files.

I made a few additions/changes that makes working with the software easier: The XML description line no longer needs to be removed afterwards!

As before, x and y scaling factors can be specified, input is via STDIN (-i) or a file (-f FILEINAME) and output is, as before, to a new file or to STDOUT (-o).

In addition, I have added the possibility to remove "terminals" from the element. This can be useful when terminals can be omitted from overloaded front views.

Furthermore, there is now the possibility to flip polygons and lines horizontally and/or vertically. This can be useful during the development of complex front views, as long as these functions are not yet available in the QET element editor.

Special care should be taken with the option "--OverwriteOriginal", because here the original file will be overwritten WITHOUT further request!

The scaled values of the new element are written into the new file with a maximum of 2 decimal places. In my view, this is completely sufficient for the display of schematic symbols and front views (thumbnails). In some elements present in the QET collection I have seen values with up to six decimal places, which in my opinion is excessive.
To "fix" such elements, QET_ElementScaler can of course be used! With the call:

QET_ElementScaler -f FILENAME

the values are rounded to max. 2 decimal places and any font sizes with decimal places are rounded to whole numbers.

I wish all users of the software a lot of fun and success with it and would like to see bugs reported (e.g. here or at github). Of course, I also have an "open ear" for suggestions for improvement!

Best regards
plc-user

Hallo Thomas,

ich kann Dir leider nicht helfen, sondern möchte Deine Anforderung noch erweitern:
Es gibt auch viele Reihenklemmen mit drei Anschlußmöglichkeiten am Markt, die im Klemmenplan abgebildet werden wollen!

Gruß
  plc-user

Stimmt, den Teil hatte ich vergessen, zu erwähnen: Kauf-Software und die mitgelieferten Dateien unterliegen meistens irgendwelchen unfreien Lizenzen!

via online-translator:

C'est vrai, j'avais oublié de mentionner cette partie : Les logiciels achetés et les fichiers qui les accompagnent sont généralement soumis à des licences non libres !

Hello Joshua,

that looks good: No more crash! Thank you!


cela a l'air bien : Plus de crash ! Merci !

Hallo Ke Chouffe,

Vielleicht ist einfach ein "Problem" mit der eingestellten Sprache, dass die Such-Funktion das passende Element nicht findet?

Versuche doch mal, die QET-Sprache auf "französisch" einzustellen:
Menu -> Einstellungen -> Sprache
(anschließend QET neu starten)

via Online-translator:

Peut-être est-ce simplement un "problème" avec la langue choisie qui fait que la fonction de recherche ne trouve pas l'élément correspondant ?

Essaie donc de régler la langue QET sur "français" :
Menu -> Paramètres -> Langue
(puis redémarrer QET)

Hallo nicolas.lotito,

".xsy" bezeichnet nur die File-extension. Interessant wäre, wie die Grafik innerhalb der Datei gespeichert ist. Ist das Dateiformat irgendwo ausgiebig beschrieben? Wahrscheinlich nicht, wenn es sich um eine Bezahl-Software handelt...

Eine Benutzersammlung ist im Prinzip schon vorhanden: Sie wird aber wahrscheinlich noch leer sein (vgl. Bildschirmfoto).
Du kannst aus der QET-Sammlung Elemente einfach in die Benutzersammlung ziehen, dort per Rechts-Klick Ordner erstellen, etc.
Anschließend kannst Du die Elemente in der Benutzersammlung per Doppelklick editieren.

via online-translator:

Le fichier ".xsy" désigne uniquement l'extension de fichier. Il serait intéressant de savoir comment le graphique est enregistré à l'intérieur du fichier. Le format de fichier est-il décrit en détail quelque part ? Probablement pas s'il s'agit d'un logiciel payant...

Une collection d'utilisateurs est en principe déjà disponible : Mais elle est probablement encore vide (voir la capture d'écran).
Tu peux simplement faire glisser des éléments de la collection QET vers la collection utilisateur, y créer des dossiers par un clic droit, etc.
Ensuite, tu peux éditer les éléments dans la collection d'utilisateurs en double-cliquant dessus.

... hmmm ... how do I tell ???

sorry: same behavior as before: crash with the hint to line 74 of "texteditor.cpp" where an assertion isn't fulfilled.

Info: "QElectroTech V 0.90-DEV+ffc2a7a7db0a58100c957a06d79751d3"
Info: "Compilation: GCC 12.2.0"
Info: "Built with Qt 5.15.4 - x86_64 - Date : Sep 27 2022 : 19:56:13"
Info: "Run with Qt 5.15.4 using 8 thread(s)"
Info: "CPU : model name\t: 11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz\n"
Info: "RAM Total : 31 GB"
Info: "RAM Available : 29 GB"
Info: "GPU :  Intel Corporation TigerLake-LP GT2 [Iris Xe Graphics] (rev 01)\n"
Info: "GPU RAM : "
Info: "OS : linux  - x86_64 - Version : Debian GNU/Linux bookworm/sid - Kernel : 5.19.0-2-amd64"

and later:

qelectrotech: sources/editor/ui/texteditor.cpp:74: void TextEditor::setUpChangeConnection(QPointer<PartText>): Zusicherung »m_change_connection.isEmpty()« nicht erfüllt.

I'll be patient!  nomicons/wink

Hallo nicolas.lotito

Du kannst eine eigene Benutzersammlung füllen bzw. erstellen, in die Du die Elemente, die Du am häufigsten brauchst, nach eigenen Wünschen ablegen und auch bearbeiten kannst.
Wenn Du Deine Sammlung komplettiert hast, würden wir uns freuen, wenn Du Deine Elemente mit uns teilen würdest!

Ich kenne "Xrelais" oder "Winrelais" und deren Dateiformat nicht. Im Moment sind die Import-Funktionen von QET noch nicht sehr umfangreich. scorpio hat aber schon den Hinweis auf den DXF-zu-elmt-Converter gegeben. Manchmal ist es aber auch sinnvoller, Elemente von Anfang an selbst in QET zu erstellen, oder bestehende Elemente umzuarbeiten, um daraus neue zu erstellen...

via online-translator:

Tu peux remplir ou créer ta propre collection d'utilisateurs, dans laquelle tu peux déposer les éléments dont tu as le plus souvent besoin, mais aussi les modifier selon tes propres besoins.
Lorsque tu auras complété ta collection, nous serions heureux que tu partages tes éléments avec nous !

Je ne connais pas "Xrelais" ou "Winrelais" et leur format de fichier. Pour l'instant, les fonctions d'importation de QET ne sont pas encore très étendues. scorpio a cependant déjà donné l'indication du convertisseur DXF en elmt. Mais il est parfois plus judicieux de créer soi-même des éléments dans QET dès le début, ou de retravailler des éléments existants pour en créer de nouveaux...

Done:
https://qelectrotech.org/bugtracker/view.php?id=269

Hello alberts!

Free and OpenSource software is not only there to be used, but may and should even be improved or extended by yourself!

The sources of Coban can be rewritten to a runnable program without knowing how python works!
I don't know python, but nevertheless, with the help of the error messages and an internet search engine, I managed to get the program basically running on a current "Debian/GNU Linux unstable".

I was curious to see what the programme would do and in the process I also translated some texts into English with an online translator because my French is very bad.

Some things still don't work because some data is expected in files, but they don't exist, and/or Coban can't write them to a file. Some python knowledge may be necessary to fix this...

It's just a lot of work to get this stuff working again! You just have to want to do it and invest a little time! nomicons/wink

In the attachment you find my revised version of the program. I don't give any guarantee for it: Use it at your own risk!

Kind regards
plc-user


PS:
Please don't ask me any questions about Python!
I can't answer them anyway!  nomicons/wink

Hello Laurent,

I guess you misunderstood something:
This thread is not about copy-and-paste - that's the other thread I started.
This thread is about a reproducible crash of QET when inserting a text-element in element-editor!

Something seems to go wrong when saving and reloading an element and QET crashes, because the source-code-line 74 of sources/editor/ui/texteditor.cpp says so:

assert(m_change_connection.isEmpty());

(see above)

I can even reduce the steps to reproduce:

- create a new element
- place a text somewhere
- save the element
- reload the file (menu - file - reload)
- click at the text-element
- crash!

When using the Element-Editor I found a way to reproducibly crash QET.
The steps to reproduce the crash are as follows:

QET crashes reproducible when:
- create a new element
- place a text somewhere
- edit the text
- move the text somewhere else
- save the element
- reload the file (menu - file - reload)
- click at the text-element
- crash!

Same behaviour when:
- open an element-file with some text
- copy and paste a text-element
  (view zooms and shifts somewhere!)
- save the element-file
- reload the file (menu - file - reload)
- click at the pasted text-element
- crash!

When starting QET from commandline these two lines appear in both cases when crashing (system-language is set to German):
qelectrotech: sources/editor/ui/texteditor.cpp:74: void TextEditor::setUpChangeConnection(QPointer<PartText>): Zusicherung »m_change_connection.isEmpty()« nicht erfüllt.
Abgebrochen


QET- and System-Info:
"QElectroTech V 0.90-DEV+d7e1813ffb0a58100c957a06d79751d3"
"Compilation: GCC 12.1.0"
"Built with Qt 5.15.4 - x86_64 - Date : Aug 16 2022 : 08:39:41"
"Run with Qt 5.15.4 using 8 thread(s)"
"CPU : model name\t: 11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz\n"
"RAM Total : 31 GB"
"RAM Available : 30 GB"
"GPU :  Intel Corporation TigerLake-LP GT2 [Iris Xe Graphics] (rev 01)\n"
"GPU RAM : "
"OS : linux  - x86_64 - Version : Debian GNU/Linux bookworm/sid - Kernel : 5.18.0-4-amd64"
*** Qt screens ***
"( 1 : 1920 x 1080 )"

In the attachment you find a small element-file i use for the "crash-tests" but you can use any other element-file.

In the attachment you find the Element-File.
I edited the element-file with a text-editor to sort the elements by type and added some blank lines for readability - no changes in position-values!

Do the developers have any influence on the position where the graphical elements are pasted from the clipboard?

When I copy and paste individual graphical elements, they are pasted with an X offset of 30. If there is a text element in the clipboard, it will be pasted with an X-Offset of 30.6094 (as shown in the example). If graphic elements are copied together with text, everything is pasted with an X-Offset of 32.1094 (see example).

On the one hand, the different treatment of graphical elements and text bothers me, and on the other hand, I find it rather strange that the paste position depends on whether text is involved.

But what I find particularly disturbing is the fact that four (!) decimals are used here, which cannot be "fixed" again with the help of the graphical editor. Especially when (text) elements are copied and pasted several times, decimals are added, so that this effect is intensified.

If the programmer(s) have any influence there, I would wish that the insert offset is at least always integer. If for some reason there are decimal places, I think it would make sense to limit the decimals to a maximum of two. When editing polygons manually, only two decimals can be entered (at least in the graphical editor).

EDITED
Just created a new version of QET_ElementScaler:
With the newly added optional parameter "-o" or "--stdout" it is now possible to write the scaled element-data to stdout instead of writing a renamed file.

The new option "-i" or "--stdin" allows QET_ElementScaler to be used with re-direction and/or pipes on the commandline:
The input-data is read from stdin and the output will be written to stdout.

Examples to write to stdout:
QET_ElementScaler -o InputElement.elmt 1.4 > NewScaledElement.elmt
QET_ElementScaler -o InputElement.elmt 1.4 | OtherSoftwareBinary

Examples to use re-direction and/or pipes:
QET_ElementScaler -i  1.4 < InputElement.elmt > NewScaledElement.elmt
cat  InputElement.elmt | QET_ElementScaler -i 1.4 | OtherSoftwareBinary

Have a look and give it a try:
https://github.com/plc-user/QET_ElementScaler

Hello mezga,

at the moment the series 2003 and 2005 do not exist as front-views in QET. 

But you are welcome to create and share the two series of terminal blocks in the same style as the existing ones!  nomicons/wink

Edit:
The most recent versions of the WAGO-Parts are included in the DEV-packages of QET.
Just created Pull-Request #219 including some terminal-blocks from series 2003 and many other changes.

Regards
plc-user

Hello jhonathan!

I like your rulers! nomicons/smile

They are created with the same scale we agreed with the developers in the other thread: https://qelectrotech.org/forum/viewtopi … 155#p16155

If I understood Joshua correctly, he wants to add the possibility to display the measurement in mm directly when creating an object (line, rectangle, etc.) in the element editor.

I think it is a good way to draw mounting plates with the help of such rulers:
There are so many possible dimensions for mounting plates that it seems impossible to create all variants as a separate element. For DIN-rails (as comparable part) I only created a few in 10cm steps...
The same challenge exists for cable ducts: They even have to be adapted to the respective situation, so there can't be standard lengths either.