301

(193 replies, posted in Import DXF)

Hello vadoola!
Salut Laurent !

vadoola wrote:

That calculation is based on trying to map the real world dimensions to pixels based on an A4 Sheet of paper using the standard QET Template.

As I already wrote several times in this forum:
QET is primarily a software to draw schematic diagrams.
QET is no substitute for CAD software like LibreCAD, AutoCAD or so.
The only dimension QET "knows" is px!
These number of px can be set by every user individually for height/width of a folio.
A folio itself has no direct connection to a papersize – it can be printed to any papersize, users have a printer for.

So in my opinion we should NOT use a specific size of paper for the scaling of elements!

As I suggested several times we should use a front-view-scaling where the user can see the real size at first sight or where he/she can calculate the real size by using a simple integer factor:
1 mm <-> 2 px

1 px is also the smallest step size, a QET-Element can be moved in diagram-editor. So then we could "move" the elements by 1 px = 1/2 millimeter in real-life.

We already have a wild mixture of scaling-factors with front-views: Please don't add another!



About the texts / fonts

That wasn't meant as a negative criticism: just a remark that this is the case.
It is clear to me in particular that there is still a lot of work to be done to integrate the texts correctly into the element. You will have "a lot of fun” with the text position, because it is not directly on the baseline of the first letter, but on a bounding box that is specified by qt, but not well described...

A difference to many other software: QET can only handle font-sizes which are integer numbers!

LievenC wrote:

In the new version I found another issue ...

Can't reproduce either:
TitleBlock-Template is removed from directory, Templates-Tree and ComboBox in QET-Settings.

Do you possibly have file-access-problems on your "non-admin"-machine?

On M$ where I don't have admin-rights I only use the "Ready-To-Use" - Version!
I use DoubleCommander to unpack and copy it to a folder in "D" and it works perfectly for some years now!
When upgrading to a new version you first have to delete the elements-folder for the case that some elements are moved from one folder to another AND you have to prevent the config-folder from overwriting.

You are right, Lieven, the ComboBox with the list of ALL templates isn't filled with the company-templates!

Sorry for confusion!

I am already on the search in the sourcecode, where this is going wrong...

But in the meantime you can use the "workaround"!

EDIT:
Found, where it went wrong! (see attachment)
Will create a pull-Request on GitHub!

305

(193 replies, posted in Import DXF)

Hello Vadoola!
Salut Laurent !

That's a great step forward, Vadoola!

It looks very good, but unfortunately I have to say that the dimensions are not yet right. There's a factor of 10/3 in there somewhere with the part I used. The attached part has the dimensions 60 x 210 mm, but the resulting element is 200 x 700 px.

And when I look at the texts that come out of a previously used example (05DI-AD16DIX-10.dxf): There the font is not correct yet and the font height is not set either, so QET uses the default size 9 when opened.
This is how it looks now (formatted by hand!)

        <dynamic_text x="35.12" y="-11.14" z="0" rotation="0" 
            uuid="{51347e64-514a-47dc-8c7f-aa180de58afd}" 
            font="Arial Narrow" 
            Halignment="AlignHCenter" Valignment="AlignVCenter" 
            text_from="UserText" frame="false" text_width="-1" color="#000000">
            <text>\C7;\fArial|b0|i0|;\H0.030335398390889;All Connectors 
are Located 
Under Gullwing 
Covers</text>
        </dynamic_text>

When I look at the texts in the converted element, I think that this would be correct for the text, font and font height:

        <dynamic_text x="35.12" y="-11.14" z="0" rotation="0" 
            uuid="{51347e64-514a-47dc-8c7f-aa180de58afd}" 
            font="Arial,3" 
            Halignment="AlignHCenter" Valignment="AlignVCenter" 
            text_from="UserText" frame="false" text_width="-1" color="#000000">
            <text>All Connectors 
are Located 
Under Gullwing 
Covers</text>
        </dynamic_text>

The font-size of "3" in this example has of course to be set to the correct value: I chose a reasonable value here.

In QET-Settings for new projects you find ALL titleblock-templates from ALL collections to choose from.

In project- or folio-settings you only find templates that are available in the project:
Drag the newly created template from the tree to a folio to add it to the project. Then you can also choose from the dialog, which template to use.

If I understand your problem correct, you have to choose "New template (enter its name)" and then you can edit the filename.
see screenshots

I use latest QET dev-version with Debian/GNU Linux (unstable).

Salut Rigautou !

Welche Anleitung hast Du gelesen, aber nicht verstanden?
Was hast du bereits ausprobiert?
Frage bitte konkret nach, was du nicht verstanden hast!

via Online-Translator:

Quelles sont les instructions que tu as lues mais que tu n'as pas comprises ?
Qu'est-ce que tu as déjà essayé ?
Demande concrètement ce que tu n'as pas compris !

Ich verstehe das so, daß die Datei qet_labels.xml in Dein eigenes Element-Verzeichnis gehört.
Die Forumsuche nach dem Begriff "qet_labels" liefert auch diesen Eintrag:
https://qelectrotech.org/forum/viewtopi … 772#p19772

See this post https://qelectrotech.org/forum/viewtopi … 867#p19867 and entire thread.

Hallo Anatilight,

drei Verbesserungsvorschläge:

  • "blättere" vor dem Erstellen eines Posts durch die vorhanderen Themen: Meist findet man was Passendes zum Thema!

  • benutze die Forum-Suche – auch für die anderssprachigen: Mit "dashed" als Suchbegriff habe ich direkt das Passende gefunden und mit "gestrichelt" gibt es das sogar bebildert!

  • benutze aussagekräftige "Betreff-Zelen" für Deine Fragen: "Dumme Fragen" gibt's hier häufiger!

Nichts für ungut! nomicons/smile

312

(193 replies, posted in Import DXF)

Hello Vadoola!
Salut Laurent !

About the Texts / Fonts:

I don't know, where to find "official" information about fonts in QET, so I noted what I found out about fonts in sources of QET_ElementScaler:
https://github.com/plc-user/QET_Element … nts.h#L301
If no font size is defined in the font-tag it defaults to "9" in QET what often is too big!

So the question is:
Do texts in dxf include a size? I guess so.
So you should add that info to the font-tag in elmt-file, Vadoola.

Hello Sterly,

This is definitely an interesting feature to generate mechanical drawings from the QElectroTech files. This also includes, for example, drilling plans for control cabinet mounting plates.
A few things are still missing for this: The elements would have to provide the necessary information and perhaps this would even be 3D information? In any case, QElectroTech is designed for 2D drawings.

Interesting feature, but most likely not available in QET in the foreseeable future. Unless you know someone who can support the project in this respect!

314

(29 replies, posted in Import DXF)

Kellermorph wrote:

Here is the dwg.

i tried it with https://download.qelectrotech.org/qet/b … .0/win_64/

Nö!
Unter dem Link ist das (inzwischen veraltete) Konvertierungsprogramm zu finden.
Es geht um die dxf-Dateien, die Du konvertieren möchtest!

Du schreibst, dass Fehlermeldungen auftreten, oder eine leere Zeichnung aus der Konvertierung herauskommt, lieferst aber die dxf nicht mit, die uns helfen würden, dir helfen zu können!

315

(29 replies, posted in Import DXF)

Kellermorph wrote:

I tried to import it with my Work Computer (Windows) with dxf2elmt. But i only get an empty Page.

(Spätestens!) jetzt wäre der richtige Moment, Deine dxf-Dateien mal hier zu posten, um dem Kollegen Vadoola die Chance zu geben, dxf2elmt weiter verbessern zu können! Oder einfach nur zu sehen, woran es hapert...
Es sei denn, es gibt rechtliche Bedenken, die zu veröffentlichen...

316

(193 replies, posted in Import DXF)

Hello Vadoola,

start reading here:
https://github.com/plc-user/QET_Element … ts.cpp#L50
it's (almost?) the same as in QET

As input-parameter I use a rectangle that represents the min- and max-values of all graphical elements. This rectangle is a global variable "ElmtMinMax" and is determined during the processing of every part.

317

(29 replies, posted in Import DXF)

Kellermorph wrote:

Ich hatte doch nur gesagt, dass ich nicht wusste, dass dxf2elmt über den Element Editor gestartet wird und ich am versuchen war eine gui wie bei dxftoqet zu starten bekommen. Das hatte ich einfach zuerst geladen bevor ich dxf2elmt gesehen hatte.

Ich wiederhole mich hier ständig ...

dxf2elmt ist ein eigenständiges (!) Kommandozeilen-Programm, für das Dir freundliche Leute die Möglichkeit geschaffen haben, das über einen Menüeintrag in QElectroTech grafisch zu benutzen!

Du kannst es selbstverständlich genau so nutzen, wie Du in Deiner ersten Nachricht geschrieben hast:

Kellermorph wrote:

./dxf2elmt deos600.dxf

Bei korrekter Ausführung liegt dann neben der Ursprungs-DXF eine QET Element-Datei.

318

(29 replies, posted in Import DXF)

Hallo Vadoola,

die Diskussion über Interna von dxf2elmt sollten wir im anderen Thread fortführen, da es hier eher um die Anwendung davon geht:
https://qelectrotech.org/forum/viewtopi … 468#p20468

319

(193 replies, posted in Import DXF)

Hello Vadoola,

about the definition-line.

The definition-line describes the dimensions of the element and is calculated by the element editor. It is therefore not noticeable that the values have not been calculated (correctly) if the import is carried out directly in the element editor.
If the element is converted on the command line and the element is used directly in the diagram editor, it is not displayed correctly because the width, height and hotspots are not set correctly.
This is particularly noticeable when dragging the element onto the folio, see appendix.

You already write it in a comment in your code (src/qelmt/mod.rs from line 59:

//The original code had the height, and width hard coded to 10
//and the hotspots hard coded to 5. I'm not sure why this is?
//Maybe actually calculating the size wasn't worth it? I'm not sure
//if that info is part of the dxf. And maybe when you open he elemnt
//in the elemtent editor it corrects it anyway. Just look into it, and
//se if this is something that needs to get adjusted.

The values for the definition line can only be calculated correctly if all information about all graphical elements is available.
In QET_ElementScaler I keep the whole QET-element in memory and recalculate the definition-line after scaling and before writing anything to stdout.
The calculation is specific to QET and it took me some time and help from Laurent and Joshua to implement it accordingly.

If you read in the file sequentially and output everything immediately to stdout, the definition-line values can not be correct. As far as I know, the necessary information is not in the dxf...

320

(29 replies, posted in Import DXF)

Kellermorph wrote:

Ne das DXFtoQET von der Homepage von QElectrotech hat eine eigene GUI.

Jetzt verwirrst Du mich völlig:
Die ganze Zeit schreibst Du von dxf2elmt und auf einmal sagst Du, Du benutzt DXFtoQET ...

Daß das zwei unterschiedliche Paar Schuhe sind, ist Dir klar?
Und daß seit Längerem bevorzugt dxf2elmt benutzt werden sollte, weil es aktiv weiterentwickelt wird, ist Dir auch klar?

Ziemlich verwirrt ... Gute Nacht!

321

(29 replies, posted in Import DXF)

Kellermorph wrote:

Ich wusste nicht, dass der Import über den Element Editor gestartet wird, da bei der eigenen Version eine eigene GUI kommt.

Das verstehe ich nicht!
Wo kommt eine eigene GUI mit?
Bei dxf2elmt ist mir noch keine aufgefallen.
Und auf der github-seite steht ja auch explizit: "Dxf2elmt is CLI program ..."

Es ist auch keine Pflicht, das über den Element-Editor zu importieren:
Es ist ein Kommandozeilen-Programm, das Du auch zum Beispiel in Skripten verwursten kannst, um ganze Verzeichnisse direkt ohne Umweg über eine GUI zu konvertieren.

Im Anschluß an die Konvertierung ist es nur nötig, das neu erstellte Element einmal im Element-Editor zu öffnen und wieder zu speichern, da das Kommandozeilenprogramm (zumindest in der letzten Version, die ich kenne) die Werte für die sog. "Definition-Line" des Elements nicht korrekt berechnet und daher im Diagram-Editor die Elemente nicht korrekt dargestellt werden.
Aber die Elemente müssen ja ohnein im Element-Editor weiter bearbeitet werden, um auch die Eigenschaften (Bezeichnung, Hersteller, Artikelnummer, etc.), die Texte und die Anschlüsse einzubauen...

Kellermorph wrote:

Natürlich werden diese geteilt, auch wenn ich nicht glaube, dass diese viele brauchen werden, da es nur ein kleiner deutscher Hersteller ist. Aber das ist ja der Grundgedanke hinter Opensource.

Wenn mich nicht alles täuscht, ist mir hier im Forum der Hersteller schon mal "über den Weg gelaufen"...

322

(29 replies, posted in Import DXF)

Hallo Kellermorph!

Der DXF-Import ist ja nur für Bauteile bzw. Elemente vorgesehen. Deswegen gibt es auch nur im Element-Editor den Menüeintrag "DXF import".

Da wirst Du ja schon mal draufgeklickt haben und dann hat sich ein Fensterchen mit einer Kurzanleitung geöffnet (siehe Anhang).
Für den Download empfehle ich inzwischen die neue Version, die Vadoola programmiert und scorpio810 (Laurent) im anderen Beitrag verlinkt hat.
Die kopierst bzw. entpackst Du in den "Installationsordner", der mit dem lokalen Dateimanager geöffnet wird, wenn Du auf den Button klickst.
Auf Linux-Systemen muß die Datei erst noch als ausführbar deklariert werden, bevor sie genutzt werden kann. (Rechtsklick -> Eigenschaften, o.Ä.)

Aber:
Verspreche Dir nicht zu viel vom DXF-Import!
In den DXF-Dateien der Hersteller sind meist nur irgendwelche 2D-Ansichten der Bauteile drin, die sowieso im Element-Editor weiter bearbeitet werden müssen, da oftmals so viele grafische Details der Bauteile drin sind, die einfach nur die Element-Datei aufblähen und keinen weiteren Nutzen haben. Die Anschlüsse (Terminals) mußt Du sowieso selber in das neue Element einfügen, da die nicht vom dxf dargestellt werden. Und auch bei den Texten und Beschriftungen wirst Du Hand anlegen müssen.

Oftmals kommt es dann zur späten Erkenntnis:
"Mensch, das hätte ich schneller und mindestens genauso schön direkt im Element-Editor selber machen können...!"
Und wenn Du dann erst einen Grundstock an schönen Elementen hast, wirst Du dann nur noch diese als Basis für neue Elemente nutzen. So meine Erfahrung!

Dann freuen wir uns natürlich darüber, wenn Du diese schönen Elemente mit uns teilst!
https://qelectrotech.org/forum/viewforum.php?id=10

323

(29 replies, posted in Import DXF)

Kellermorph wrote:

Ich glaube, ich bin zu doof, das hinzukriegen.
Geht das nur über das Terminal und nicht per GUI?

Viele Leute sind wohl einfach überfordert, sich selber schlau zu lesen, bevor sie in einem Forum Fragen posten, die bereits x-mal beantwortet wurden!

Zitat von hier (https://qelectrotech.org/download.php) gleichlautend von hier (https://github.com/antonioaja/dxf2elmt) und hier (https://github.com/Vadoola/dxf2elmt)
"Dxf2elmt is CLI program which can convert .dxf files into .elmt files."

Und im Forum gibt es bereits viele Anfragen zu dem Thema!

Zusätzlich bekommen wir keine Informationen von Dir, auf welchem System Du das alles versuchst.
Was hast Du überhaupt alles schon versucht? Auch dazu nur eine unvollständige Aussage...

Ich kenne Dich nicht und möchte Dir auch nicht Unrecht tun: Du warst nur der Auslöser für diesen Beitrag!

Deswegen:
Wer Hilfe braucht, dem wird auch geholfen!
Ihr müßt nur mitmachen (wollen) und bereit sein, dafür etwas mehr zu tun als immer dieselben Fragen im Forum zu stellen!

  • Benutzt die Forums-Suche

  • Nutzt auch die anderssprachigen Foren

  • Liefert Informationen zu eurem System (OS, QET-Version, etc)
    Zum Beispiel so:
    Hilfe -> Über QElectroTech -> Tab "Version" -> Inhalt kopieren

  • Stellt konkrete Fragen

  • liefert aussagekräftige Fehlermeldungen: "Geht nicht!" ist nicht genug

In diagram-editor you can insert pictures.
Convert your pdf to png-images and insert one per folio.

325

(193 replies, posted in Import DXF)

Such an additional MessageBox should only popup, when there really is information for the user: When everything's fine there should be no additional Box to close...

This means that we should be very frugal with any outputs in our CLI software!
If there is nothing to report, then shut up!   nomicons/wink