Hi Galexis, 
I've tried some combinations and this are the results.  Note the difference between X1:3 and X1:4.

Check again and if there are some problems send me your diagram (or a part) to debug and find the problem.

Hi, a new version 0.7.2 is deployed. Now for TB created with no searching implicit connections, the xref for the terminal is showed. A comment in the checkbox remembers the behavior.

Fixed also the bug  [font=Verdana, Helvetica, Arial, sans-serif]when user clicks on button to change "QET user collection path" in config tab.[/font]

To update:

>> Update on Linux
sudo pip3 install --upgrade qet_tb_generator

>> Update on Windows
python -m pip install --upgrade qet_tb_generator

The picture shows the differences between the TB:

Hi. I've been travelling for work reasons.

Next weekend I'll do a update. 
 * if "search implicite connection" is disabled, then the xref for the terminal block will be showed.
  * if "search implicite connection" is enabled, then appears the xref for connections in every terminal block's side.


I've checked diferent options to implement teminal block in QET and maybe an option is allowing to define when a conductor is a bridge. Maybe adding a checkbox in the conductor properties dialog. This will be a easy way to create terminal blocks.

Hi, I'm using different software watching the best way to implement a solution in QET.
Galexis, why do you need the previous version? The last version includes old version with some fixes. If you need something different, say me and I could implement a checkbox in the config tab in order to have a different behavior.

The qet file edited:

Hi Aleksandr, I edited your diagram and I post a sample result.

galexis wrote:

I don't understand why you want to have 2 differents xref on terminal ?
What i know about electrical schematic, xref on terminal is the position about him, no ?

About clamp, I think, it's shoul be more simple : If I want to have 2 terminal side by side and connected by "clamp", I draw 2 terminal with same potential at the bottom or top and two consecutive number.

Every terminal at the terminal strips no implies that is drawed previously in the diagram. You could draw a lot of conductors to  a +1 potencial, but you are not drawing the terminal element. The xref for every side of the terminal strip is the xref of the elements that are connected.
Implicit connections end with a dot '.' 

About clamps, is possible to have a connector on the electrical box that could be use as option by the final customer. In this case you only need to draw the male or female part.

Maybe you mean thas is not necessary that the script generates the MALE and FEMALE parts?

Any element of type "terminal" will be considered to make the terminal strip.

In the above example, the conductor 313 is connected (in any page) to a terminal. In our case the terminal XA:4. So all the cables with the same potencial are considered connected to this terminal. But the are one exception: if the conductor goes from a PREVIOUS FOLIO to a NEXT FOLIO is not considered a connection (it's only a bridge)

Maybe the problem is that a TERMINAL element keep conductor numbers on it connections, and the script considers that all conductors with same number are interconnected.

I created a new version (0.7.1) and you can disable searching for implicits connections. Check the terminal strip created with the option "Search for implicits connections" unchecked.

I made several tests and I did the algorithm to solve most of the problems, but I'm sure it's not perfect. We need to check and find errors. When will work "perfect", I'll try to implement in QET. But for tests I spend less time modifying the script to find the best way to solve the problem. Later, to put inside QET will be a coding problem, not a programming problem.

I'm finding another software to draw electrical diagrams and check how it solves.

(My english is not good. I'm spanish)

@Galexis: Check the help tab of the pluging. It explains how the terminal strip is created. 
In short, searches first for terminal elements, and later check conductors with the same number that are considered implicit connections.

I generated again the terminal strip for your project and differs. Check please the last versión of the plugin.

Hi Galexys, the Xref ending by a point are found as implicits connections. Later I'll test your QET file and check why.

In previous versions, the xref refers to the terminal, and now refers to the connected element. The up and down connections depens of the orientation of the terminal in the diagram. If rotates, will change on the terminal strip.

I 've implement a "Connectors" option. In the picture, shows that drawing the red part, we obtain the connector on the green part.

Could someone recommend me a diagram software that I can check to see how it implements  "Block terminals" and "Connectors"?. I need to see some ideas to implement the algorithm yet implemented in QET.




GUIDE TO INSTALL / UPDATE
Requires python 3.5 or above.

>> First install on Linux (tested on xubuntu 16.06)
1. Check python version: python3 --version
   To intall python 3.5:
        sudo add-apt-repository ppa:fkrull/deadsnakes
        sudo apt-get update
        sudo apt-get install python3.5
        sudo rm /usr/bin/python3
        sudo ln -s /usr/bin/python3.5 /usr/bin/python3
2. check you have pip3 installed: pip3 --version.
   If not install with: sudo apt-get install python3-pip
3. Install the program: sudo pip3 install qet_tb_generator
4. Run the program: qet_tb_generator

>> Update on Linux
sudo pip3 install --upgrade qet_tb_generator

>> First install on Windows
1. Install, if required, python 3.5 or above
2. pip install qet_generator

>> Update on Windows
python -m pip install --upgrade qet_tb_generator

New version of QET_TB_Generator 0.6.4 is available.

Update with: sudo pip3 install --upgrade qet_tb_generator

Now there are a new TAB with helpfull information about requirements to use. This version searches for explicit and implicit connections to a Terminal Strip.  The implicit connections ends with ' · '.

Check please, to fix all problems and finally have the algoritm than solves the problem and incluide it to QET.

May be the next step will be to find the algorithm to draw a summary for CONNECTORS:

(image 2)

The pictures show the behavior when:
- the are only one terminal element for every voltage
- all terminals with a default config (e.g. no data on "designation" field for terminals element)
- multi page

I don't understand. In other software, how do you say at what terminal strip belongs every terminal?

With the actual script, specify in the "designation" field where is connected is optional. If you don't put it will use a blank space or create a new one, but if you specificy 1 or 2 it forces North or South.

If we consider that it will be only a one terminal strip, I could search for all terminals, auto numerate and modify the XML of the schema with the data. Every terminal will have the same number that cables that are connected. Later search for implicit connections.

In a future, when QET can manage teminal strips, every time you place a terminal element, appears a contextual menu to choose at wath terminal stip is connected. It will be auto numbered as you place, and if is connected to an existing voltage, respect the numeration.

In project properties, a new tab allow manage terminals strips (add, delete, view components,...).

The same solution will be applied to cables with several wires. You need to specified cables, and when you draw a connection, specify if its a new wire of a cable.

@[size=3][font=Verdana, Helvetica, Arial, sans-serif]scorpio810[/font]
If you have a cable with severals wires, it's better to connect all of his wires to the same side of the terminal block: NORTH or SOUTH.




I changed the script, and now are considered implicit connection to a terminal block, conductors that:
  * one of its connections is to a "next_report" element (like 'next_folio' or 'previous_folio".
  * are not conductors connected to a terminal element (because was tracted as explicit)
  * is required that this voltage have at least one terminal element.

The image shows all posible combinations:
  * explicit terminals with blank in its 'designation' field
  * explicit terminals where we force side (1=north, 2=south) at its 'designation' field
  * terminals that are in the middle of a conductor (designation = 1,2 or 2,1)
  * implicit connections

For implicit conection, at the terminal block, appears the xref for the conductor side not connected to "next_folio" element.

We showld test the script, and when it works, we've the algortim that solve the problem, and will be easy to implement at QET. Can you give me some QET project to I check the script?

Here is a screenshot of the result for the new script termianl block creation.

The red and blue terminals are correct processed. Fer every terminal is respected the number pole where the schema defines the connection. Every standart terminal have 2 poles (1 for the north side or 2 for the south side).

Note than now every cable of the terminal block haves a xreference.

The scripts also search for implicit connections (in green). Search conductors that have the same ''num" that any terminal and checks that its terminal_id_1 and terminal_id_2 are no connected to a terminal element. If not, is added to the terminal block. The problem is that the coordinates x and y of the conductor are peculiar. The implicit connectios ends by '#' in the terminal block.

¿Do you know how should I interpret the coord for conductors?

@Nuri:
Not for now. First I could study the source code of QET with the purpose of understand it. For me will be easy to solve with the pluging, and when works for all scenarios, we'll do inside QET.

A list for all scenarios using terminals:
* one element on the schema represents NORD and SUD
* one element on the schema represents a voltage and doesn't specify at what side of the terminal is connected
* one element on the schema represents a voltage and specify at what side of the terminal is connected
* several conductors with same name (voltage), and at least  one of them is connected to a terminal.

There is an option: count how many conductors have the same voltage. The total amount, will be assigned alternative to the Top and Bottom side in the terminal block.

To know how voltages need to count, there must be a minimum one terminal used for this voltage. The terminal block will be the sum of explicit + implicit terminals.

Solution for terminals the represents every connected cable (with the same conductor name or not).
You can specify the order of connected. 
1,2 represents the  'black' cabled is connected on upper side and the cable 012 to the bottom
2,1: 'black' connected bottom and 012 up.

Possible solution for terminals connected to a common potential (bridge). You can specify the side where  the cable connected.

Hi, I'm Raul, the author of the Terminal Block Plugin.

I'm thinking how to solve the bornier problem. The next picture show in 3 different colors, 3 differents situacions where the same element in the scheme represents differents real situations.

I'm thinking how to solve the problem to improve the plugin in later apply the solution inside QET.

I thougth to use the "designation" field to specify which screw represent every element in the schema. The script will check of 'terminal' type elements and checks it's "designation" field. According the info will draw the correct teminal block.

I don't used to use other electricical drawing software, so I dont't know how they solve this problem.

Hi guys,

In about 5 months I'll join to QET project.  If there are some bugs in QET Terminal Block Generator say me and I'll fix.

The destination place of a pip3 installation is by default for all users. If you want to install for current user, you could write : pip3 install --local <package_name>

Perfect !!

By now it's enough. In about 6 months I'll can dedicate more time.

If there are some bug in qet_tb_generator say me.

Hi. This works. 
The menu entry might be something like: "Launch plugin ..."
The text of message box something like:

Requires python 3.5 or above.
>> First install on Linux
1. check you have pip3 installed: pip3 --version.
   If not install with: sudo apt-get install python3-pip
2. Install the program: sudo pip3 install qet_tb_generator
3. Run the program: qet_tb_generator

>> Update on Linux
sudo pip3 install --upgrade qet_tb_generator

>> First install on Windows
1. Install, if required, python 3.5 or above
2. pip install qet_generator

>> Update on Windows
python -m pip install --upgrade qet_tb_generator


CODE

/**
* @brief QETDiagramEditor::slot_generateTerminalBlock
*/
void QETDiagramEditor::slot_generateTerminalBlock() {

bool success;
QProcess *process = new QProcess(qApp);

// If launched under control:
//connect(process, SIGNAL(errorOcurred(int error)), this, SLOT(slot_generateTerminalBlock_error()));
//process->start("qet_tb_generator");

success = process->startDetached("qet_tb_generator");
if ( !success ) {
QMessageBox::warning(0,
"Error launching plugin",
"To install the plugin blah blah\nVisit https://pypi.python.org/pypi/qet-tb-generator/" );
}


}