From aa35045840b78d3f48212db45da59a2e5c69b223 Mon Sep 17 00:00:00 2001 From: saurabhb17 Date: Wed, 26 Feb 2020 15:57:49 +0530 Subject: Added main execs --- pcbnew/scripting/tests/test1.py | 11 +++++++++++ pcbnew/scripting/tests/test2.py | 8 ++++++++ 2 files changed, 19 insertions(+) create mode 100644 pcbnew/scripting/tests/test1.py create mode 100644 pcbnew/scripting/tests/test2.py (limited to 'pcbnew/scripting/tests') diff --git a/pcbnew/scripting/tests/test1.py b/pcbnew/scripting/tests/test1.py new file mode 100644 index 0000000..b1f7cff --- /dev/null +++ b/pcbnew/scripting/tests/test1.py @@ -0,0 +1,11 @@ +import pcbnew + +pcb = pcbnew.GetBoard() + +for m in pcb.GetModules(): + print m.GetPosition() + for p in m.Pads(): + print "p=>",p.GetPosition(),p.GetPadName() + print p.GetPosition() + + diff --git a/pcbnew/scripting/tests/test2.py b/pcbnew/scripting/tests/test2.py new file mode 100644 index 0000000..e925f88 --- /dev/null +++ b/pcbnew/scripting/tests/test2.py @@ -0,0 +1,8 @@ +import pcbnew + +pcb = pcbnew.GetBoard() + +for m in pcb.GetModules(): + print m.GetReference(),"(",m.GetValue(),") at ", m.GetPosition() + for p in m.Pads(): + print " pad",p.GetPadName(), "at",p.GetPosition() -- cgit