In the beginning it was Paint
How potentials came about in Sketrix: from a coloured line to a system that finds short circuits. Turning point: a gut feeling and a green test that lied.
What it does → Schematic editorPotentials are among the oldest things in Sketrix, back in February you could already create layers in the standard colours and colour a wire path by hand, and at the start that was really no more than colour on the line. Later on I once described it as basically being Paint, because all I was doing was colouring in the line.
Even that was hard enough to build, above all across several pages, when a wire stops at a break point and carries on on another sheet. In April I spent two days trying to get the colour across, and in the end everything was rolled back, with a note that I would first think calmly about how to build it properly. On that same day it carried on with a different idea, where the break points that belong together share the colour, and that one did work.
But I knew that colour alone would not be enough. My concept contains the sentence that Sketrix should show quality and not average, and colouring in lines would never have got me there.
A feeling that was right
The real turning point came at the start of September, and it came from a place I would not have expected. While testing, sometimes things connected and sometimes nothing did, wires went through corners or never arrived at all, and at the time I wrote down: I think the potential point breaks everything, just a feeling.
And the feeling was right, because if you had hidden a potential layer, the app behaved differently, a hidden protective earth for example could no longer be connected at all. The cause was that in twenty places in the program the question of whether something is visible decided what happens, even though for the electrics it makes no difference at all whether you can see something right now or not.
After that I separated layers and potentials completely, a layer has been pure display ever since, and a potential can no longer be hidden, only highlighted. The concept for this has thirty-three decisions, and one of them says that no wire gets coloured by hand any more, which I find quite funny looking back, because in February that is exactly how it had all started.
A green test that was wrong all the same
While building there was one spot I have to laugh about today. At the beginning I did not yet have a finished picture of what potentials should look like in the end, and on the question of what a potential is generated from, I decided that you enter it by hand in a selection field. It was built that way, and in the acceptance run I gave it eleven out of eleven green, without a single error.
In that same test, as I kept clicking, I wrote down that it was thought far too complicated and had to be simpler, that I had imagined it completely wrong, and I asked myself what the difference between this field and the potential itself was even supposed to be, it is the same thing. Four days later the field was gone without replacement, and since then Sketrix simply reads the origin from the wiring.
From line to system
Today a potential is a thing of its own with a name, and if you like you can give it the conductor type, the voltage or the protection type for extra-low voltage. Where it comes from is marked directly at a component’s connection as supply, external voltage or generated, and from there the colour travels through the plan, across terminals and break points too. When two potentials meet, neither wins quietly, the wire is marked with a red dash-dot line.
On top of that there is a check at the push of a button that looks only at the potentials and finds what you miss when you click something together quickly: short circuits, a protective earth that ends open, contradictions in extra-low voltage or external voltage without an orange marking. The findings sit in a list, and one click jumps to the spot in the plan. Originally this was meant to run live while drawing, but you could feel it getting sluggish, and that is why there is a button now. Today potentials live in around 9,000 lines, backed by about 480 tests.
And now
The foundation is in place: separate layers, the potential as a thing of its own, the origin read from the wiring, and the check. The special cases still lack a fair bit, and the clearest one is the reversing contactor circuit. Since April it has reported a short circuit on a perfectly correct plan, because the two contactors swap two line conductors over and the check sees two potentials on one wire. By now it turns yellow instead of red after checking, but really something switched should not be an error at all, otherwise you never get a clean plan even though it is right.
On top of that, T-junctions do not colour correctly yet, the legend for the PDF is being built right now, and for the moment two checks are still running side by side, the new one for potentials and an older one that I want to rebuild for the most part.
Martin