1 (edited by moasbär 2020-08-04 00:41:54)

Topic: Probleme mit Terminals bei geänderten Bauteilen

Hallo,

seit einiger Zeit nutze ich jetzt QelectroTech um meine Hausautomatisierung zu dokumentieren. Ich finde das Programm als Freeware echt Klasse.
Nur ich habe immer wieder das Problem, dass ich nach dem Ändern eines Bauteils Probleme mit den Anschlüssen habe.
Es läuft also so ab:
Ich ändere ein Bauteil im Editor, ändere Größen, verschiebe Kontakte. Danach speichere ich das Bauteil ab.
Nun ziehe ich das geänderte Bauteil in die Zeichnung und schließe die Kontakte an. Passt alles perfekt. Nun speichere ich nach getaner Arbeit mein Projekt ab.

Wenn ich dann das Projekt erneut öffne sind in dem Strompfad von meinem geänderten Bauteil die Kabel durcheinander, bzw. auch gar nicht mehr vorhanden.


Kennt jemand dieses Problem? Mache ich was falsch?
Gibt es hierfür eine Lösung?

Das Problem habe ich bei einigen geänderten Bauteilen, bei einigen gibt es aber keine Probleme und alles funktioniert einwandfrei.

Das erste der 5 Leitungen sollte eigentlich an den 5. Anschluss, an dem es auch vor dem erneuten Öffnen des Projekts angeschlossen war.

Grüße
moasbär

Post's attachments

After.jpg, 74.74 kb, 544 x 396
After.jpg 74.74 kb, 238 downloads since 2020-08-04 

Re: Probleme mit Terminals bei geänderten Bauteilen

I also faced this problem. It turned out that when creating elements, you cannot copy outputs. Each output gets its own ID. And when copying, all pins have the same ID. I found out about this when I opened the element in a text editor.

Re: Probleme mit Terminals bei geänderten Bauteilen

Aleksandr wrote:

I also faced this problem. It turned out that when creating elements, you cannot copy outputs. Each output gets its own ID. And when copying, all pins have the same ID. I found out about this when I opened the element in a text editor.

Thanks for feedback Aleksandr.

UUID for terminals output was added recently by Martin for new feature and yes is a bug, thanks.
https://qelectrotech.org/forum/viewtopi … 055#p12055
When pasting terminals on editor, editor need to create a new random UUID and not copy the parent UUID property.

Maybe a workaround is to remove UUID on XML <terminal orientation=               > attributes chain.

Editing an element linked to wires is risky if you move the terminals a little too much in editor.

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

Re: Probleme mit Terminals bei geänderten Bauteilen

Thanks for your answers,

I didn´t edit the element in editor when it was connected to wires, I edit it before, and then i dropt it to the drawing.


But the reason for my discribed issu is the copy and paste of the terminals in the editor.

I tried to put always new terminals in the editor, not to copy and paste the already used terminals and it works.

Thanks for your help.

5 (edited by De-Backer 2020-08-05 17:41:10)

Re: Probleme mit Terminals bei geänderten Bauteilen

scorpio810 wrote:
Aleksandr wrote:

I also faced this problem. It turned out that when creating elements, you cannot copy outputs. Each output gets its own ID. And when copying, all pins have the same ID. I found out about this when I opened the element in a text editor.

Thanks for feedback Aleksandr.

UUID for terminals output was added recently by Martin for new feature and yes is a bug, thanks.
https://qelectrotech.org/forum/viewtopi … 055#p12055
When pasting terminals on editor, editor need to create a new random UUID and not copy the parent UUID property.

Maybe a workaround is to remove UUID on XML <terminal orientation=               > attributes chain.

Editing an element linked to wires is risky if you move the terminals a little too much in editor.

Who will try to solve this?
And how, the copy paste is not designed to handle this.

copy() {
    // delegue cette action a la scene
    m_scene -> copy();
    offset_paste_count_ = 0;
}
paste(const QDomDocument &xml_document, const QPointF &pos) {
    // objet pour recuperer le contenu ajoute au schema par le coller
    ElementContent content_pasted;
    m_scene -> fromXml(xml_document, pos, false, &content_pasted);
 
    // si quelque chose a effectivement ete ajoute au schema, on cree un objet d'annulation
    if (content_pasted.count()) {
        m_scene -> clearSelection();
        PastePartsCommand *undo_object = new PastePartsCommand(this, content_pasted);
        m_scene -> undoStack().push(undo_object);
    }
    return(content_pasted);
}

maybe one should explaining me the utility / purpose for UUID terminals,
what was wrong with 1 UUID for the element,
and numbers for the terminals?

02going_arrow.elmt (version=0.3)

<definition width="40" version="0.3" hotspot_x="18" hotspot_y="15" height="30" type="element" ic="true" orientation="dyyy"
link_type="next_report">
<uuid uuid="{717352A1-F3C7-49C7-9A06-51620AB5CA00}"/><names>
        <name lang="ru">Следующая страница</name>
        <name lang="ar">الصفحة التالية</name>
        <name lang="de">Nächste Folie</name>
        <name lang="el">Επόμενη σελίδα</name>
        <name lang="en">Going arrow</name>
        <name lang="it">Foglio successivo</name>
        <name lang="fr">Folio suivant</name>
        <name lang="pl">Wyjście adresowe</name>
        <name lang="es">Folio siguiente</name>
        <name lang="cs">Další list</name>
        <name lang="nl">Referentie volgend</name>
    </names>
    <informations>Author: The QElectroTech team
License: see http://qelectrotech.org/wiki/doc/elements_license</informations>
    <description>
        <polygon x4="-9" antialias="true" style="line-style:normal;line-weight:normal;filling:black;color:black" closed="false" y1="-4" x1="-9" y2="4" x2="-9" y3="0" x3="2" y4="-4"/>
        <line length1="1.5" length2="1.5" antialias="false" end1="none" end2="none" style="line-style:normal;line-weight:normal;filling:none;color:black" y1="0" x1="-9" y2="0" x2="-12"/>
        <input x="6" y="0" size="9" rotate="true" text="/"/>
        <terminal x="-13" y="0" nameHidden="0" number="" name="" orientation="w"/>
    </description>
</definition>

version="0.80"

<definition link_type="previous_report" hotspot_x="8" type="element" width="30" hotspot_y="10" height="20" version="0.80" orientation="dyyy">
    <uuid uuid="{d9d5ac46-d734-49f6-9027-ed5a50e4547d}"/>
    <names>
        <name lang="es">folio anterior</name>
        <name lang="nl">Referentie Vorig</name>
        <name lang="it">Foglio precedente</name>
        <name lang="de">Vorherige Folie</name>
        <name lang="ru">Предыдущая страница</name>
        <name lang="ar">الصفحة السابقة</name>
        <name lang="el">Προηγούμενη σελίδα</name>
        <name lang="pl">Wejście adresowe</name>
        <name lang="en">Coming arrow</name>
        <name lang="fr">Folio précédent</name>
        <name lang="cs">Předchozí list</name>
    </names>
    <informations>Author: The QElectroTech team
License: see http://qelectrotech.org/wiki/doc/elements_license</informations>
    <description>
        <polygon x1="-1" y2="4" x4="-1" x2="-1" style="line-style:normal;line-weight:normal;filling:black;color:black" y4="-4" y1="-4" antialias="true" x3="9" y3="0" closed="false"/>
        <line x1="9" y2="0" end1="none" length2="1.5" x2="12" end2="none" style="line-style:normal;line-weight:normal;filling:none;color:black" length1="1.5" y1="0" antialias="false"/>
        <dynamic_text text_from="UserText" Valignment="AlignTop" z="3" text_width="-1" font="Sans Serif,9,-1,5,50,0,0,0,0,0" x="-44" uuid="{8b32ab87-b8ec-4564-bdec-c3ea4036a492}" y="-11.5" Halignment="AlignLeft" frame="false" rotation="0">
            <text>/</text>
        </dynamic_text>
        <terminal name="" x="13" uuid="{6db93440-be5c-4e83-bae3-34a68cb24127}" y="0" orientation="e"/>
    </description>
</definition>

for KiCAD;
connector.lib
(terminal = X) no UUID id's not even for the element

#
# 4P2C
#
DEF 4P2C J 0 40 Y Y 1 F N
F0 "J" -200 350 50 H V R CNN
F1 "4P2C" 100 350 50 H V L CNN
F2 "" 0 50 50 V I C CNN
F3 "" 0 50 50 V I C CNN
$FPLIST
 4P2C*
$ENDFPLIST
DRAW
S 300 300 -300 -200 0 1 10 f
P 3 0 1 0 -250 -25 -200 -25 -200 -25 N
P 3 0 1 0 -250 25 -200 25 -200 25 N
P 3 0 1 0 -250 75 -200 75 -200 75 N
P 3 0 1 0 -250 125 -200 125 -200 125 N
P 15 0 1 0 -250 -125 -250 225 -50 225 150 225 150 175 200 175 200 125 250 125 250 -25 200 -25 200 -75 150 -75 150 -125 -250 -125 -250 -125 N
X ~ 1 400 0 100 L 50 50 1 1 P
X ~ 2 400 100 100 L 50 50 1 1 P
ENDDRAW
ENDDEF

connector.dcm

#
$CMP 4P2C
D RJ connector, 4P2C (4 positions 2 connected)
K 4P2C RJ female connector
F ~
$ENDCMP

Re: Probleme mit Terminals bei geänderten Bauteilen

I sent you a few emails, then you will better understand Martin's desired goal.
It is a continuation of a very old work to add numbers or text properties on terminals primitives:
https://listengine.tuxfamily.org/lists. … 00034.html

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

7 (edited by De-Backer 2020-08-05 18:39:54)

Re: Probleme mit Terminals bei geänderten Bauteilen

scorpio810 wrote:

I sent you a few emails, then you will better understand Martin's desired goal.
It is a continuation of a very old work to add numbers or text properties on terminals primitives:
https://listengine.tuxfamily.org/lists. … 00034.html

thanks,

Joshua wrote:

Very wrong approch (if I were to create it now I will use uuid instead).

but he does not explain why.
further they talk about the wires and no longer about the terminals.
Am I right so far?

my thought:

part        designation  code diagram   code element
element   = K01          ??             UUID
terminal  = 11           ??             11
wire      = 10 200       ??             ------does not exist
terminal  = 22           ??             22
element   = K05          ??             UUID

??= will this be a new unique ID (UUID)?

8 (edited by De-Backer 2020-08-05 21:13:54)

Re: Probleme mit Terminals bei geänderten Bauteilen

My question to @Joshua: what should it look like if you start from scratch?
And why don't you want to do this. (2 different files should not be supported, just convert to the new format.)
I know this will take a long time.
But then you work on a structure that you have made yourself, one that can be less difficult.
we can then also change the element lib.

(This is a question in the what if)

Re: Probleme mit Terminals bei geänderten Bauteilen

mmit 86766a90905a209e73f2ac2bf23b29de5f6d8043
Author: Claveau Joshua <Joshua@<
Date:   Wed Aug 12 15:45:48 2020 +0200

    Element editor : a copied/pasted terminal part have a new uuid.

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