fritzing / fritzing-app

Fritzing desktop application
http://fritzing.org
Other
4.02k stars 829 forks source link

No control over connections made over perfboard #4012

Closed dronus closed 2 weeks ago

dronus commented 1 year ago

Current Behaviour

When in breadbord view, connecting a wire from a part or breakout to another one over perfboard connects the wire from the first part's pin to the breadboard "pin". So parts can't be moved around without breaking about half of the connections.

Build: <Version 0.9.6 (b ) 64 [Qt 5.15.2]

Operating System: <Ubuntu 22.04>

Steps to reproduce:

Expected Behaviour

All connections should connect to the parts first, and move with it if part is rotated / moved. Only use the perfoboard "pin" if wires are to be connected to each other.

vanepp commented 1 year ago

I'm not clear on what you are asking for here. If I do what you said above it works as expected.

capture

if I then move the ic the wires follow (as they won't on a real perfboard though!)

capture1

If you mean stripboard (which I expect is what you do mean) that is a different case (and more difficult to do!)

capture2

I would argue the moving the IC here acts like real life, only the IC moves not the wires. I expect changing that to be hard in the code, and will break the case where the user wants to move only the IC not all the wires meaning the current operation is probably the better choice.

capture3

dronus commented 1 year ago

When I connect a wire from an IC pin, it is attached to the pin. When I connect a wire to an IC pin, it is connected to perfoboard eye instead. As a single wire between two ICs always has a to side, this gives the arbitrary decision which IC the wire should connect to (aka the IC you more likely need to move at some point of design) and which side you connect to board, having the IC only connected as long as it stays in place.

vanepp commented 1 year ago

As you see above what you want happens if the wire terminates on the IC pin rather than on the perf board (although that doesn't reflect what typically happens in real life!) Doing that always would likely be difficult (because the perf board and the part are different connections) and more importantly would preclude what is currently possible which is moving an IC that was incorrectly placed although that can have unexpected effects and thus isn't recommended. Here is an example of what can happen. Starting from here where the IC is connected to the perf board pads.

capture

I can correct a placement error by moving the IC one space left

capture1

which I can't do without moving all the wires on the IC probably by deleting and replacing them to make sure they connect to the IC and not the perf board. In the case where the wires are connected to the pins, moving the IC can then create unexpected (and wrong!) connections as the IC will attach to the perf board. Here I connected the wires to the pins

capture2

then moved the IC (with the wires following.) note when I click on a pad on the resistor perfboard strip all connections (including a new one in the ICs new position) light up as being connected together.

capture3

If there were already components attached to that perfboard strip you would potentially create a short across a component like this

capture4

Here we see the resistor has shorted because of the added wire between two perfboard traces and the movement and re connection of the IC to the perf board. That can still happen now, but it requires that you make the connection to the IC pin (which is uncommon) rather than to the perfboard which is the usual case. As a result I expect there will be reluctance to make such a change (although that isn't my decision.)

dronus commented 1 year ago

I think what you are showing is a "strip board" in my nomenclature. What I am talking about is a board with solder dots only, no connections at all, those will be made by wires. So there have wires always connect to pins would be a great benefit, as it would allow move any part around without changing the wiring between them.

dronus commented 1 year ago

Even if this is meant for better experience on strip board, it's still abitrary why the "from" connection point is attached to the part, but the "to" connection point is attached to the board.

KjellMorgenstern commented 1 year ago

For the perfboard, and without any other definitions like connections in the schematic or PCB, this should not happen:

image

My guess for why this is happening is that the wire connects either to the perfboard donut or to the IC pin, based on some kind of proximity or history of the mouse drop event.

dronus commented 1 year ago

I think it depends on the order of the clicks. The first click seems to always attach to a pin, the second one to a donut. So there is some control, but for any single wire, only one end can be connected to a pin, the other will always connect to the board. That gives headaches on the order of clicks, because if well thought of, some components may be moved later without breaking the netlist, but others not.

KjellMorgenstern commented 2 months ago

We had a closer look at this.

If a place has multiple possible connections, they are sorted according to the the method "wireLessThan" in connectoritem.cpp.

Bascially that is:

For connectors of same type, the z-Order is used.

When starting the wire, it is possible to exactly select the pin of the IC or the ring of the perfboard. Only for "To" connections, this is no longer possible.

KjellMorgenstern commented 2 months ago

Considering this as a bug. We want to have the control over the target of the connection, same as we have it when starting a wire.

Besides this, because the highlight elements, the hit box etc all increase in size when zooming in, it still is tricky to select the element, even at high zoom levels. This is a different issue, we already have it at high priority.