From 51ca019d17d3cbd682c591d863e91dfef89dc728 Mon Sep 17 00:00:00 2001
From: Neil Gershenfeld <gersh@cba.mit.edu>
Date: Mon, 30 Aug 2021 17:43:41 -0400
Subject: [PATCH] ack, problem is roundoff error

---
 python/frep-C.py | 2 +-
 python/pcb.py    | 4 ----
 python/test      | 1 +
 3 files changed, 2 insertions(+), 5 deletions(-)
 create mode 100644 python/test

diff --git a/python/frep-C.py b/python/frep-C.py
index 9b08be7..6856fc0 100755
--- a/python/frep-C.py
+++ b/python/frep-C.py
@@ -74,7 +74,7 @@ f"""
 #include <png.h>
 using namespace std;
 int fn(float X,float Y,float Z) {{
-   cout << Z << ' ' << ({fn}) << endl;
+   cout << Z << ' ' << (Z-(-0.06)) << endl;
    return ({fn});
    }}
 int main(int argc, char** argv) {{
diff --git a/python/pcb.py b/python/pcb.py
index 187e037..c3a003f 100755
--- a/python/pcb.py
+++ b/python/pcb.py
@@ -7958,10 +7958,6 @@ mask = .004 # solder mask size
 
 pcb = PCB(x,y,width,height,mask)
 
-pcb = wire(pcb,w,
-   point(x,y,zt),
-   point(x+width,y,zt))
-
 pcb = wire(pcb,w,
    point(x,y,zb),
    point(x,y+height,zb))
diff --git a/python/test b/python/test
new file mode 100644
index 0000000..b47b6dd
--- /dev/null
+++ b/python/test
@@ -0,0 +1 @@
+{"function": "(16777215*(((((((3.02-X)-(1))*(0.0)+(Y-(1))*(1.0)) >= 0) & ((((3.02-X)-(1))*(0.0)+(Y-(1))*(1.0)) <= 0.8700000000000001) & ((((3.02-X)-(1))*(-1.0)+(Y-(1))*(0.0)) >= (-0.015/2)) & ((((3.02-X)-(1))*(-1.0)+(Y-(1))*(0.0)) <= (0.015/2)) & (Z == (-0.06))))))", "layers": [-0.06], "xmin": 0.95, "xmax": 2.07, "ymin": 0.95, "ymax": 1.9200000000000002, "mm_per_unit": 25.4, "type": "RGB"}
-- 
GitLab