Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kicad-source-mirror
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
kicad-source-mirror
Commits
b54acf60
Commit
b54acf60
authored
Apr 06, 2012
by
Miguel Angel Ajo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
example for pcb creation in scripting
parent
96c1a50e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
0 deletions
+21
-0
createPcb.py
pcbnew/scripting/examples/createPcb.py
+21
-0
No files found.
pcbnew/scripting/examples/createPcb.py
0 → 100755
View file @
b54acf60
#!/usr/bin/env python
from
pcbnew
import
*
import
pcbnew
pcb
=
BOARD
()
module
=
MODULE
(
pcb
)
module
.
SetReference
(
"M1"
)
pad
=
D_PAD
(
module
)
module
.
m_Pads
.
PushBack
(
pad
)
pad
.
thisown
=
0
pcb
.
Add
(
module
)
pcb
.
Save
(
"/tmp/my2.brd"
)
print
map
(
lambda
x
:
x
.
GetReference
()
,
list
(
pcb
.
GetModules
()))
print
"Saved?"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment