Add /examples/1207718.png for bug with vertical electrode connections, fix bug, also... master
authorNick Downing <nick@ndcode.org>
Fri, 18 Jul 2025 06:47:29 +0000 (16:47 +1000)
committerNick Downing <nick@ndcode.org>
Fri, 18 Jul 2025 12:03:22 +0000 (22:03 +1000)
examples/1207718.png [new file with mode: 0644]
examples/1215218.png [new file with mode: 0644]
n.sh
resistor_solver.py

diff --git a/examples/1207718.png b/examples/1207718.png
new file mode 100644 (file)
index 0000000..8be1d94
Binary files /dev/null and b/examples/1207718.png differ
diff --git a/examples/1215218.png b/examples/1215218.png
new file mode 100644 (file)
index 0000000..95c4354
Binary files /dev/null and b/examples/1215218.png differ
diff --git a/n.sh b/n.sh
index 1e25e22..5ac1fea 100755 (executable)
--- a/n.sh
+++ b/n.sh
@@ -1,4 +1,6 @@
 #!/bin/sh
+./resistor_solver.py examples/1207718.png 1207718.png
+./resistor_solver.py examples/1215218.png 1215218.png
 ./resistor_solver.py examples/SlotInPlane.png SlotInPlane.png
 ./resistor_solver.py examples/stillOKfor32.png stillOKfor32.png
 ./resistor_solver.py examples/stripe1et.png stripe1et.png
index 55cf061..4669b9f 100755 (executable)
@@ -69,7 +69,7 @@ for n1 in numpy.nonzero(image_horiz.reshape((n,)))[0]:
   i.extend([n1, n1, n2, n2])
   j.extend([n1, n2, n1, n2])
 for n1 in numpy.nonzero(image_vert.reshape((n,)))[0]:
-  n2 = n1 + ys
+  n2 = n1 + xs
   v.extend([1, -1, -1, 1])
   i.extend([n1, n1, n2, n2])
   j.extend([n1, n2, n1, n2])