1

(4 replies, posted in Elements)

Es wird jedenfalls schöner und passender, wenn alle denselben Maßstab haben:
Dann kann man nach dem Aufbauplan ein passendes Gehäuse wählen und muss nicht schätzen!

2

(4 replies, posted in Elements)

Hallo Jürgen,

bitte suche im Forum nach "Maßstab"!
Im Suchergebnis sind auch weitere Posts verlinkt, die zu diversen Diskussionen führen, die das Thema seit Jahren behandeln.

Wenn in einem Aufbauplan unterschiedliche Maßstäbe verwendet werden, kommt nix Gescheites dabei raus!
Deswegen habe ich auch schon einige Frontansichten der Sammlung auf 1mm <-> 2px skaliert, damit wir einen Maßstab haben!
Ich sehe es aber nicht wirklich ein, den Schrott von anderen alleine ausbessern zu müssen: Es sind viele verschiedene Skalierungen vorhanden, wo sich wahrscheinlich jeder Ersteller gesagt hat: "Kommt doch ungefähr hin...!"
Krass ausgedrückt ist "kommt dem schon nahe" trotzdem falsch!

Why do we need to offer the plugin for download on the QET website?
GitHub has binary files for Linux and Windows in the corresponding repository:
https://github.com/raulroda/qet_tb_gene … aster/dist
There is no new version since 1.3.1 and these are available there.

@galexis:  "Do it yourself!"  nomicons/wink

4

(4 replies, posted in Elements)

Hallo Jürgen,

ich bleibe ausnahmsweise mal bei Deutsch...

Ich habe mir nur den Shelly genauer angesehen und dabei kommen mir diese Gedanken:
In anderen Threads im Forum haben sich mehrere Leute unter anderem für den DXF-Import darauf geeinigt, sowas wie einen "Maßstab" von 1mm <-> 2px einzuführen, wenn's um Frontansichten von Geräten geht. Das ist hier nicht eingehalten.

Wobei: Soll das ein Schaltplansymbol oder eine Frontansicht sein?

Eine Frontansicht hat meiner Meinung nach keine Anschlüsse (Terminals) und ein Schaltplansymbol sieht in den allermeisten Fällen nicht wie das reale Gerät aus, sondern bildet die elektrische Funktion nach.
Es handelt sich hier um eine Mixtur aus beidem, was bei Laien und Bastlern sehr beliebt ist! Im professionellen Bereich ist das meiner Erfahrung nach aber SEHR unüblich! Und wir wollen mit QET doch gerne professionell arbeiten, oder?

Wenn es für ein reales Gerät jeweils eine Frontansicht im "Maßstab" 1mm <-> 2px und ein separates Schaltplansymbol gäbe, brauchten auch keine überlappenden Leiter im Schaltplan befürchtet werden, weil z.B. zwei nach oben ausgerichtete Terminals dieselbe X-Position haben, wie es hier der Fall ist.

Terminals werden gerne auch auf einem 10 x 10 - Raster angeordnet, um automatisches Verbinden beim Ziehen des Bauteils auf's Folio zu ermöglichen.

Auf den ersten Blick sieht das Siemens-Teil sehr ähnlich aus, sodass meine Anmerkungen auch hier zutreffend sein werden.


Das mag im ersten Moment ein wenig niederschmetternd klingen, aber wenn wir uns bei den Elementen einmalig ein bisschen mehr Arbeit machen, kommen anschließend umso schönere, bessere und professionellere Schaltpläne und Aufbauzeichnungen dabei heraus!

Falls es dich tröstet: Viele der Elemente, die ich zu QET beigetragen habe, habe ich auch mehrmals angepasst...

Gruß
  plc-user

5

(150 replies, posted in Code)

Hello everybody,

scorpio810 wrote:

For now, I only provide Qt5 versions, but what will happen if they compile it themselves with Qt6?

I guess, the Qt6-version will come with an increased version-number, will it?
In that case we should add a warning, when opening an "old" file to choose "save as..." for saving the changes or to create a backup before going on!
If such a warning is also included in Release-Notes puts us developer in a safe position, I guess...!

Kellermorph wrote:

(...) automatically create a backup when a .qet file created with qt5 is opened with a qt6 version?

If there are hints in Release-Notes and an additional warning-message, when loading an "old" file ... I guess that should be enough: After all, the user is responsible for making backup copies of their data.


For the official element collection, we should completely revise the elements for the switch to Qt6. It might help that I already did this for the introduction of the Liberation fonts...

You can draw such plans with QET, but there is NO WAY to get a printed circuit from a QET-diagram!
Learn to use KiCad  ...  that software is made for electronic circuits and not very hard to use! nomicons/smile

7

(150 replies, posted in Code)

Hallo QET-Entwickler!
(English version follows)

Unabhängig von der letzten Änderung bezüglich der font-family haben wir eine Herausforderung!
In den vorhandenen Elementen wird von Qt5 die Schriftart-Information so gespeichert:

font="Liberation Sans,5,-1,5,50,0,0,0,0,0,Regular"

Wenn diese Element-Datei von der Qt6-Version von QElectroTech geöffnet und wieder gespeichert wird, wird die Schriftart-Information wie folgt gespeichert:

font="Liberation Sans,5,-1,5,400,0,0,0,0,0,0,0,0,0,0,1,Regular"

So weit so gut:
Die Schrift wird richtig in das neue Format übersetzt!

Sollte die Projekt- oder Element-Datei, die mit Qt6 gespeichert wurde, mit einer Qt5-Version geöffnet werden, werden die verwendeten Schriftarten nicht erkannt und daher ALLE Schriftarten auf einen Qt6-Standart "Sans Serif" und die Standart-Größe "9" gesetzt!
Dies zerstört im Zweifel also das gute Aussehen der Elemente, die mit der Qt6-Version von QET erstellt bzw. gespeichert wurden!

Wir müssen die Benutzer also darauf hinweisen, daß es keinen (einfachen) Weg gibt, die Projektdateien und die Elemente, die einmal mit der Qt6-Version gespeichert wurden, wieder mit älteren QET-Versionen zu öffnen!

Gruß
  plc-user



Englsh translation:

Hello QET-developers!

Regardless of the latest change about the font family, we have a challenge!
In existing projects and elements, Qt5 stores the font information as follows:

font="Liberation Sans,5,-1,5,50,0,0,0,0,0,Regular"

When this element file is opened and saved again by a Qt6 version of QElectroTech, the font information is stored as follows:

font="Liberation Sans,5,-1,5,400,0,0,0,0,0,0,0,0,0,0,1,Regular"

So far, so good:
The font is correctly converted to the new format!

However, if the project or element file saved with Qt6 is opened with a Qt5 version, the real fonts are not recognised and ALL fonts are set to the Qt standard ‘Sans Serif’ and the standard size ‘9’!
This may/will destroy the good appearance of the elements created/saved with the Qt6 version of QET!

We must therefore point out to users that there is no (easy) way to open project files and elements that were once saved with the Qt6 version using older QET versions!

Best regards
  plc-user

If you would attach a minimal example where the "problem" is shown, we maybe could help you...

Der Quellcode ist seit ein paar Tagen öffentlich verfügbar und oben verlinkt.
Wer ihn hätte lesen und bewerten wollen, hätte nur dem Link folgen müssen...

Im Original hat der Programmierer nicht daren gedacht, dass (meistens) nicht die komplette Bildschirmfläche für die Anwendung zur Verfügung steht, sondern durch die Task-Leiste und sonstige System-Anzeigen kleiner ist. Dies wird seit QT5 in einer separaten Funktion berücksichtigt, die ich nun für die Maximalgröße der Eigenschaften-Dialoge eingebaut habe.

Nachtrag:
Die Änderungen sind nun auch im offiziellen QET-Repo enthalten und inzwischen gibt es auch neue Release-Pakete für die verschiedenen Systeme.
Für mich sieht das Ergebnis auf Debian GNU/Linux und win gut und brauchbar aus!

The line thickness on paper depends on so many factors:
The thickness of the lines in the element, the number of columns/rows in the folio, the PDF viewer's interpretation of the line thickness, the printer driver, printer, etc.
Without seeing anything (QET file, PDF, etc.), it is impossible to say anything about this! Even if one could look at it, it would be difficult!
What is not possible: editing the line thickness of connections or elements in the diagram editor.
There is no way around it: you have to ‘tweak’ the settings yourself to adjust the line thickness on the paper.

Salut Grub !

I noticed that especially with commercial OS from Redmond...!

In my fork of QET at github I prepared a commit to fix this.
You compile QET for/on win? Maybe you can test these changes on your system, before we release them for general use?
On my Debian GNU/Linux Trixie (stable) and Forky/sid it looks good!

EDIT:
Improved code to determine maximum size of Config-Dialog.
Still waiting for response of user(s) who compile for/on win...

Regards
  plc-user

I do not know that module!

Take a look at the Mesa 7i77 in collection-tree:
There is a base-module with four terminals for Power-Supply and six separate modules with eight terminals each for TB7 and TB8.
You can only connect conductors to terminals of an element: no terminal -> no possibility to connect a conductor.
If you want to connect something to other parts than Power-Supply or TB7/TB8, you need to rework the existing elements or have to create new ones!
If you create new modules, please make sure, that the terminals are at positions that fit to the grid of 10x10 points, so that automatic connection can be done, when pulling the element to the folio. (The existing modules need to be reworked to match the grid!)

Addendum:
The elements in QET 0.100-dev have terminals at positions without decimals. Try to use those.

13

(34 replies, posted in Elements)

Salut Laurent !

scorpio810 wrote:

I just saw your last commits, many thanks to push an very clean Catatan translation PR without noise off XML random attibutes and font family changes, very good job! \o/ nomicons/wink

Thank you for the compliment!   nomicons/smile

To create this "clean" diff I used a script to add the translation from the same directory-structure as the official collection!
It searches the given directory for element-files and inside the files for the new translation, takes this and writes that to the same file in the structure of official collection.
Afterwards a new function of QET_ElementScaler sorts the localized names.

Here's the script:

#!/bin/bash
 
# Dieses Skript sucht nach Zeilen, die ein bestimmtes Muster enthalten,
# extrahiert diese und fügt sie in der Zieldatei nach einer Zeile ein,
# die ein anderes Muster enthält.
 
# Konfiguration
SourceDir="Antoni/"
DestDir="QET/"
# Muster, das in der Quelldatei gesucht wird, um Zeilen zu extrahieren
SOURCE_PATTERN="<name lang=\"ca\">"
# Muster, das in der Zieldatei gesucht wird, um die Einfügeposition zu finden (Einfügen erfolgt NACH dieser Zeile)
DEST_PATTERN="<names>"
 
# und nun in einer Schleife alle Element-Dateien bearbeiten
for SOURCE_FILE in  `find ./$SourceDir -name "*.elmt"` ; do
  DEST_FILE=${SOURCE_FILE/"$SourceDir"/"$DestDir"}
  # zur Kontrolle die Dateinamen aufschreiben
  #echo "Source: $SOURCE_FILE --> Destination: $DEST_FILE"
  # wenn die Ziel-Datei ncht existiert --> weiter!
  if [ ! -e "$DEST_FILE" ]; then
    echo "Destination-File '$DEST_FILE' does not exist --> use next SourceFile"
    continue
  fi
  # Wenn in der Ziel-Datei schon eine Zeile mit dem Muster existiert, dann nicht (!) einfügen
  LineInDestFile=$(grep "$SOURCE_PATTERN" "$DEST_FILE")
  if [ -n "$LineInDestFile" ]; then
      echo "Line with '$SOURCE_PATTERN' already exists in '$DEST_FILE'!"
      continue
  fi
  # Zeile(n) aus der Quelldatei extrahieren, die dem Muster entsprechen
  LINES_TO_INSERT=$(grep "$SOURCE_PATTERN" "$SOURCE_FILE")
  # Überprüfen, ob überhaupt Zeilen gefunden wurden
  if [ -z "$LINES_TO_INSERT" ]; then
    echo "Could not find '$SOURCE_PATTERN' in '$SOURCE_FILE'!"
    continue
  fi
  # die extrahierten Zeilen in die Zieldatei einfügen
  # --> sed mit der Option 'a' (append/anhängen nach der passenden Zeile)
  #     die Variable LINES_TO_INSERT kann mehrere Zeilenumbrüche enthalten: Formatieren für sed
  #     Zeilenumbrüche (\n) ersetzen durch das sed-spezifische Escaping (Backslash + tatsächlicher Zeilenumbruch)
  FORMATTED_INSERT=$(echo "$LINES_TO_INSERT" | sed 's/$/\\/')
  FORMATTED_INSERT=${FORMATTED_INSERT%\\} # letzten, unnötigen Backslash entfernen
 
  # sed-Befehl: Finde das Muster in der Zieldatei (/DEST_PATTERN/), hänge die formatierten Zeilen an (a\)
  # sed -i bearbeitet die Datei direkt.
  sed -i "/$DEST_PATTERN/a\\
  $FORMATTED_INSERT"
"$DEST_FILE"
 
  echo "Lines with '$SOURCE_PATTERN' have been inserted after '$DEST_PATTERN' in '$DEST_FILE'."
 
  # zum Schluss räumen wir die frisch ergänzte Datei ein wenig auf
  # und sortieren die Übersetzungen nach Länder-Kürzel:
  /usr/local/bin/QET_ElementScaler --OverwriteOriginal --OnlyCleanMeta "$DEST_FILE"
 
  done

I guess this script can be used in the future, if somebody creates another new language.

Gruß
  plc-user

14

(34 replies, posted in Elements)

Salut Laurent !

Unfortunately, replacing fonts involves manual work, as especially commercial operating systems from Redmond append localized parts to font descriptions and don't even shy away from spaces!
Here are a few examples from before the introduction of the Liberation fonts:

Arial,4,-1,5,75,1,0,0,0,0,Gras Italique
Arial Narrow,11,-1,5,75,0,0,0,0,0,Negrito
Arial Narrow Hu,9,-1,5,50,0,0,0,0,0, Normal
Calibri,6,-1,5,75,0,0,0,0,0,Bold
DINosaur Medium,9,-1,5,57,0,0,0,0,0,Medium
MS Shell Dlg 2,10,-1,5,50,0,0,0,0,0,Normál
MS Shell Dlg 2,1,-1,5,50,0,0,0,0,0,obyčejné
MS Shell Dlg 2,4,-1,5,75,0,0,0,0,0,Grassetto
MS Shell Dlg 2,4,-1,5,75,0,0,0,0,0,tučné
MS Shell Dlg 2,8,-1,5,75,0,0,0,0,0,Félkövér
Sans Serif,4,-1,5,0,0,0,0,0,0,ncrmal
URW Gothic [urw],4,-1,5,63,0,0,0,0,0,Demi

As you can see, we definitely have to take the entire font string into account when replacing fonts.
I don't have a complete script for this, but the search/replace function in DoubleCommander helps to avoid having to deal with each file individually.
At least a “translation table” has to be created manually. I don't yet know what a script for processing the files should look like.
For the extraction of font-strings from element-files, I use this part of a bash-script:

for i in  `find . -name "*.elmt"` ; do
  cat "$i" | grep font=\" | awk -F "font=\"" '{ print $2 }' | \
             awk -F "\"" '{ print $1 }' >> /tmp/tempfile.txt
  done
cat /tmp/tempfile.txt | sort | uniq > /tmp/fontstrings.txt

With this list we need to check, which of the Liberation-fonts matches the original best and create a translation-table.

In my opinion, we should only include elements in the official collection that are limited to the four fonts supplied by QET!

15

(34 replies, posted in Elements)

@scorpio810:

Salut Laurent !

On the way to have a script to insert Catalan translation of names to existing elements, I updated elements with filenames containing blanks in their name by replacing blanks to underscores.
Stay tuned for upgraded elements with Catalan translations...  nomicons/wink

Gruß
  plc-user

16

(34 replies, posted in Elements)

Salut Laurent,

when we want the fonts to be replaced correctly, we need to include the quote-signs into replacement!
For example:
From the original Oldtimer-Elements in the other thread, we find these font-descriptions:

Noto Sans ExtraBold,10,-1,0,81,0,0,0,0,0,Regular
Noto Sans ExtraBold,5,-1,0,81,0,0,0,0,0,Regular
Noto Sans ExtraBold,6,-1,0,81,0,0,0,0,0,Regular
Noto Sans ExtraBold,7,-1,0,81,0,0,0,0,0,Regular
Noto Sans ExtraBold,9,-1,0,81,0,0,0,0,0,Regular
Sans Serif,10,-1,0,50,0,0,0,0,0
Sans Serif,10,-1,5,50,0,0,0,0,0
Sans Serif,12,-1,0,50,0,0,0,0,0
Sans Serif,12,-1,5,50,0,0,0,0,0
Sans Serif,15,-1,5,50,0,0,0,0,0
Sans Serif,30,-1,5,50,0,0,0,0,0
Sans Serif,3,-1,5,50,0,0,0,0,0
Sans Serif,4,-1,0,50,0,0,0,0,0
Sans Serif,4,-1,5,0,0,0,0,0,0,normal
Sans Serif,4,-1,5,25,0,0,0,0,0
Sans Serif,4,-1,5,50,0,0,0,0,0
Sans Serif,5,-1,5,25,0,0,0,0,0
Sans Serif,5,-1,5,50,0,0,0,0,0
Sans Serif,6,-1,0,50,0,0,0,0,0
Sans Serif,6,-1,5,0,0,0,0,0,0,normal
Sans Serif,6,-1,5,25,0,0,0,0,0
Sans Serif,6,-1,5,50,0,0,0,0,0
Sans Serif,6,-1,5,50,0,0,0,0,0,Regular
Sans Serif,7,-1,0,50,0,0,0,0,0
Sans Serif,7,-1,5,25,0,0,0,0,0
Sans Serif,7,-1,5,50,0,0,0,0,0
Sans Serif,8,-1,5,0,0,0,0,0,0,normal
Sans Serif,8,-1,5,50,0,0,0,0,0
Sans Serif,9,-1,0,50,0,0,0,0,0
Sans Serif,9,-1,5,0,0,0,0,0,0,normal
Sans Serif,9,-1,5,50,0,0,0,0,0
Sans Serif,9,-1,5,50,0,0,0,0,0,Regular

Just looking at the last two lines we see double ... but not quite:
One font-string ends with a number and the other font-string also includes ",Regular".
If we only replace this

Sans Serif,9,-1,5,50,0,0,0,0,0

by this

Liberation Sans,9,-1,5,50,0,0,0,0,0,Regular

the last line would be changed to

Liberation Sans,9,-1,5,50,0,0,0,0,0,Regular,Regular

what would be wrong!

Inserting an additional element-name is another topic...

As a new user you should use QET 0.100-dev to be able to use Liberation-fonts, so that your Elements and Plans are compatible with other systems and users!

Hallo Jürgen,

hast Du mal das AppImage von QET ausprobiert? Das wird von Laurent regelmäßig erstellt und funktioniert ganz prima:
https://download.qelectrotech.org/qet/builds/AppImage/

Die Elemente, die Du oben verlinkt hast, habe ich auf die Liberation-Fonts umgestellt und hier angehängt.

Frage: Oftmals verwendest Du dynamische Texte, die aus meiner Sicht statisch sind. Hat das einen besonderen Grund?

Gruß
  plc-user

Nachtrag:
Ich glaube, dass die Elemente, die im Dateinamen "molex" enthalten, auch von der Firma hergestellt werden. Im Moment steht da ein Unternehmen aus Detmold als Hersteller drin...

I guess, you are using windows? Start QElectroTech with Batch-file "Lancer_QET.bat"!

Menu -> Configuration -> Configurer QElectroTech -> TAB "Langues"

Select Language you prefer, press "OK" and restart QElectroTech.

Hallo Jürgen,

ich war daran beteiligt, die Liberation-Schriften in QET zu verpacken und mit auszuliefern, da es in der Vergangenheit regelmäßig Probleme mit Schriften und deren Aussehen auf verschiedenen Systemen gab und immer noch gibt! Siehe dazu auch verschiedene Posts hier im Forum.
Die Schriftarten sind allerdings erst ab Version 0.100 mit drin. Und wenn die Elemente und Pläne bereits existieren, bietet QET (im Moment) keine Möglichkeit, alle Texte einer Datei in der Oberfläche global anzupassen!
Da hilft es aber, dass die Dateien aus lesbarem XML bestehen und man somit mit Hilfe von Text-Editoren hantieren kann!
So sind auch die Änderungen an der offiziellen QElectroTech-Sammung von Elementen entstanden, in der ab dem Zeitpunkt nur die Liberation-Schriftarten verwendet wurden.
Es wäre ziemlich schade, wenn wir nun Elemente aufnähmen, die wieder dieselben Schriftart-Probleme verursachten, die wir schon behoben sahen!

Für Deine oben angehängte Datei habe ich die Schriftarten in Handarbeit angepasst und mir dabei auch den Scheibenwischermotor vorgenommen, der aus meiner Sicht einer Überarbeitung würdig war. Das sind nur kleine Änderungen, aber das Element sieht meiner Meinung nach nun deutlich konsistenter aus.

Zusammengefasst:
Verwende bitte die QET-Version 0.100-dev, um die Liberation-Schriften verwenden zu können.
Für die große Zahl an Elementen, die du bereits erstellt hast, finden wir gemeinsam mit Laurent eine Möglichkeit, die Schriftarten anzupassen!

Gruß
  plc-user

21

(34 replies, posted in Elements)

Salut Laurent,
believe it or not, just today, when I read Jürgen's post about the VW Käfer / VW Beetle plans, I thought it would be nice to have a script that converts the existing fonts in a QET or elmt file to the Liberation fonts we introduced and deliver from version 0.100.
In my opinion, especially for elements that we are adding to the official collection, we should make sure that only the fonts supplied by QET are used as far as possible! That's what I want to also suggest in the other thread.
However, such a script is not trivial, as various constraints (font size, style, etc.) within the font string must be taken into account.
In the context of the conversion of the official collection, I have seen many strange font strings, which the operating system often translated into the local language, too!
But so far, it has remained just an idea for such a script...

Ensorcell wrote:

(...) it appears too large in the drawing space.

How can I resize it?

In QET 0.100-dev, the Element Editor offers the option of calling up the command line tool ‘QET_ElementScaler’, which can scale an existing element evenly in all directions. Of course, the labels are also adjusted accordingly.

There are already various questions and answers on this topic here in the forum.

23

(236 replies, posted in News)

Salut Laurent !
Hello Vadoola!
Over the last few days, I've also been wondering what exactly is missing that prevents us from switching completely to qt6 (yet) and whether anyone has a clear view ...
Let's test it out and discuss it! However, we should change forums: it's not finished yet, so it's not ‘new’ yet. That's why the ‘Code’ section is probably the most appropriate place for this discussion.

Nee, geht nicht!
Du brauchst aber nicht ein neues Bauteil erstellen, sondern nur das eine verändern, das im Projekt gespeichert ist.

Der "Ausflug" in die Schriftarten war nur als Zusatz-Info gemeint und nicht als mögliche Ursache für die unterschiedlichen Farben.

Kellermorph wrote:

I have Sans Serif 8 everywhere in the program settings.

"Sans Serif" ist strenggenommen halt keine Schriftart...

Deine KI-Erklärung sollte aber auf jeden Fall ein weiterer Hinweis sein, daß es für eine korrekte Fehlerbeschreibung nicht ausreicht, ein Bild anzuhängen:
Gerade für solche Effekte, wie Du sie beschreibst, kommen VIELE Möglichkeiten in Frage, woran es liegen kann.
Betriebssystem (win, Linux, etc.), BS-Version (win10, 11, ...) bzw. Distribution (Debian, Mint, Ubuntu,...), Desktop-Environment (KDE, Gnome, xfce,...), Farbschema/Theme, QElectroTech-Version, etc

All diese Informationen wünscht man sich als Entwickler, wenn Fehler gemeldet werden, wonach hier aber leider immer wieder explizit nachgefragt werden muss!

Dies als Hinweis und Aufforderung an alle, die in diesem Forum Fehlerbeschreibungen posten.