Skip to content
Snippets Groups Projects
Commit d9fb0f78 authored by Jingyan Ling's avatar Jingyan Ling
Browse files

update journal

parent a70bd816
Branches
No related merge requests found
......@@ -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
......
......@@ -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):
......
#!/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
# 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
File added
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment