Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
rocoelectrical
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Container Registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jingyan Ling
rocoelectrical
Commits
d9fb0f78
Commit
d9fb0f78
authored
5 years ago
by
Jingyan Ling
Browse files
Options
Downloads
Patches
Plain Diff
update journal
parent
a70bd816
Branches
Branches containing commit
No related merge requests found
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
README.md
+4
-0
4 additions, 0 deletions
README.md
analyze_dxf.py
+1
-1
1 addition, 1 deletion
analyze_dxf.py
auto_layouteditor.py
+29
-0
29 additions, 0 deletions
auto_layouteditor.py
layout_test.py
+25
-0
25 additions, 0 deletions
layout_test.py
testout.gds
+0
-0
0 additions, 0 deletions
testout.gds
with
59 additions
and
1 deletion
README.md
+
4
−
0
View file @
d9fb0f78
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
analyze_dxf.py
+
1
−
1
View file @
d9fb0f78
...
...
@@ -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
):
...
...
This diff is collapsed.
Click to expand it.
auto_layouteditor.py
0 → 100644
+
29
−
0
View file @
d9fb0f78
#!/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
This diff is collapsed.
Click to expand it.
layout_test.py
0 → 100644
+
25
−
0
View file @
d9fb0f78
# 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
This diff is collapsed.
Click to expand it.
testout.gds
0 → 100644
+
0
−
0
View file @
d9fb0f78
File added
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment