From d9fb0f7829e13b82e94775a41ff052b16f47eb60 Mon Sep 17 00:00:00 2001
From: Jingyan Ling <jingyanling2018@u.northwestern.edu>
Date: Tue, 9 Jul 2019 17:26:57 -0700
Subject: [PATCH] update journal

---
 README.md            |   4 ++++
 analyze_dxf.py       |   2 +-
 auto_layouteditor.py |  29 +++++++++++++++++++++++++++++
 layout_test.py       |  25 +++++++++++++++++++++++++
 testout.gds          | Bin 0 -> 3502 bytes
 5 files changed, 59 insertions(+), 1 deletion(-)
 create mode 100644 auto_layouteditor.py
 create mode 100644 layout_test.py
 create mode 100644 testout.gds

diff --git a/README.md b/README.md
index 053a7d0..69fc5eb 100644
--- a/README.md
+++ b/README.md
@@ -213,6 +213,10 @@
 - 2. Use `KiCAD 5` python API to sue `FreeRouting` 
 - 3. Use `KiCAD 4` python API to use builtin auto-routing
 
+###### 1 
+- `FreeRouting` input format: `dsn`, `lef`, `def`
+- `FreeRouting` output format: `ses`, `def`
+- `FreeRouting` can take arbitrary board outlines shape
 - TODO:
   - If can run KiCAD 4 from python
   - Check `FreeRouting` API, see if a acceptable file can be generated from things on hand
diff --git a/analyze_dxf.py b/analyze_dxf.py
index 4203968..18e2286 100644
--- a/analyze_dxf.py
+++ b/analyze_dxf.py
@@ -13,7 +13,7 @@ import copy
 import matplotlib.pyplot as plt
 import matplotlib.animation as animation
 from matplotlib import cm
-from array2gif import write_gif
+
 
 class auto_rounter:
     def __init__(self,path,dxf_file):
diff --git a/auto_layouteditor.py b/auto_layouteditor.py
new file mode 100644
index 0000000..324dffa
--- /dev/null
+++ b/auto_layouteditor.py
@@ -0,0 +1,29 @@
+#!/usr/bin/env python
+
+import numpy as np
+import ezdxf 
+import random
+from math import sqrt
+import copy
+from LayoutEditor import LayoutScript
+from LayoutScript import *
+
+l=project.newLayout();
+
+#rename a layer
+layers.num(6).name="new text"
+
+c=l.drawing.currentCell
+c.cellName="test-cell-python"
+
+c.addBox(0,0,5000,7000,5)
+c.addRoundedBox(10000,0,5000,7000,500,5)
+c.addChamferedBox(20000,0,5000,7000,500,5)
+c.addCircleBox(point(0,10000),point(5000,17000),5)
+c.addEllipse(5,point(12500,15000),2500,3500)
+c.addPolygonArc(point(22500,15000),2500,3500,0,340,5)
+e=c.addText(5,point(25,25000),layers.num(6).name)
+e.setWidth(1000)
+l.drawing.saveFile("/home/jingyan/Documents/summer_intern_lemur/roco_electrical/testout.dsn")
+
+print("Python script completed")
\ No newline at end of file
diff --git a/layout_test.py b/layout_test.py
new file mode 100644
index 0000000..b4803fc
--- /dev/null
+++ b/layout_test.py
@@ -0,0 +1,25 @@
+# load the LayoutScript module
+import LayoutScript
+# use LayoutScript without prefix
+from LayoutScript import *
+
+#create a new layout object
+l=project.newLayout();
+
+#rename a layer
+layers.num(6).name="new text"
+
+c=l.drawing.currentCell
+c.cellName="test-cell-python"
+
+c.addBox(0,0,5000,7000,5)
+c.addRoundedBox(10000,0,5000,7000,500,5)
+c.addChamferedBox(20000,0,5000,7000,500,5)
+c.addCircleBox(point(0,10000),point(5000,17000),5)
+c.addEllipse(5,point(12500,15000),2500,3500)
+c.addPolygonArc(point(22500,15000),2500,3500,0,340,5)
+e=c.addText(5,point(25,25000),layers.num(6).name)
+e.setWidth(1000)
+l.drawing.saveFile("/home/jingyan/Documents/summer_intern_lemur/roco_electrical/testout.gds")
+
+print("Python script completed")
\ No newline at end of file
diff --git a/testout.gds b/testout.gds
new file mode 100644
index 0000000000000000000000000000000000000000..d76872df34b83c16315acf51ce9c9badacf4d468
GIT binary patch
literal 3502
zcmZ{nX>1f!6oqf6?XXjzAa?39Ky;?G(;esxQYbBp1=>OjLfIVJQL60}+d;%cW8D2A
zs6UW|K#Zc8xJToLJ4iGx!9){dToOg&8kcC|7V&(&BT1t+DQDii_wGIC-1}~*1ubAB
z?2Md%?GTQ#0?V_aVV}nag4@&SWM8V=Y;taXeZwttmK{6vL%iwfio5o8cGwyD|9^LK
zFqlaVW@25b-rm@@otdruY0DdH791C_d<&iys6A-GsX1mgvLN^5$&)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