[Kicad-developers] fp_arc confusion

2017-06-26 Thread hauptmech
In the module s-expressions, what is the rationale for having arc center 
labeled 'start' and having the arc starting point labeled 'end'?


This bit me as I was writing an Allegro footprint extractor to kicad and 
got confused why my start,end,angle arcs were not displaying correctly.


Assuming it's an error, is there a way to fix the file format or is this 
a permanent thing?




___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] Pcbnew Python Interface breakage?

2017-06-26 Thread Kaspar Emanuel
Since people seem to be able to give the updates from off the top of their
heads, what do I need to update this footprint loading script
?
I am getting:

Traceback (most recent call last):
  File "load_all.py", line 22, in 
list_of_footprints = src_plugin.FootprintEnumerate(libpath)
  File "/usr/lib/python2.7/dist-packages/pcbnew.py", line 4386, in
FootprintEnumerate
return _pcbnew.PLUGIN_FootprintEnumerate(self, *args)
NotImplementedError: Wrong number or type of arguments for overloaded
function 'PLUGIN_FootprintEnumerate'.
  Possible C/C++ prototypes are:
PLUGIN::FootprintEnumerate(wxArrayString &,wxString const
&,PROPERTIES const *)

PLUGIN::FootprintEnumerate(wxArrayString &,wxString const &)

​

On 26 June 2017 at 17:30, Maciej Sumiński  wrote:

> Great, thank you both for testing! I have just pushed the patch.
>
> Maurice, you are right about the comment. It was already there, but
> should have been removed.
>
> Regards,
> Orson
>
> On 06/26/2017 05:16 PM, easyw wrote:
> > Hi,
> >
> > I solved with a trick
> > try:
> > board_drawings=board.GetDrawings()
> > except:
> > board_drawings=board.DrawingsList()
> >
> > for drw in board_drawings:
> >
> > for one plugin, and with a similar trick for the other;
> > but your solution is cleaner.
> >
> > is the
> > diff --git a/pcbnew/swig/module.i b/pcbnew/swig/module.i
> > correct?
> >
> > I see there is a block comment before @line 45
> > /*
> > %extend MODULE
> > ...
> >
> > Applying the patch I cannot make any plugins running
> > but if I de-comment that block it works...
> >
> >
> > Thx
> > Maurice
> >
> >
> > On 06/26/2017 2:24 PM, Maciej Sumiński wrote:
> >> Hi Maurice,
> >>
> >> This is due to the recent commit that enables iterators for DLISTs. We
> >> have forgotten that such change impacts the Python interface.
> >>
> >> I propose to keep the old interface, otherwise we will face many reports
> >> when a script works correctly with the stable release, but not with
> >> nightlies.
> >>
> >> Would you check if the attached patch fixes the problem? If so, I will
> >> push it.
> >>
> >> Regards,
> >> Orson
> >>
> >> On 06/26/2017 10:23 AM, easyw wrote:
> >>> Hi,
> >>> I can confirm the same error on windows 10.
> >>>
> >>> I get also an other kind of error in my annular plugin that worked
> >>> till now
> >>>
> >>> "for pad in module.Pads():
> >>> TypeError 'SwigPyObject' object is not iterable"
> >>>
> >>> BR
> >>> Maurice
> >>>
> >>> On 06/25/2017 5:46 PM, Simon Küppers wrote:
>  Hi,
>  I just updated KiCad on Linux Mint using the Launchpad PPA to test the
>  new connection algorithm. However, a SWIG error starts to pop up in my
>  python plugins.
>  Right now I can produce the error, when calling GetDrawings on the
>  board
>  object (which worked a few days ago). It looks like the SWIG wrappers
>  are desynchronized from the C++-code. Is that (at all) possible?
> 
>  This is the Traceback I get:
> 
>  
>  Traceback (most recent call last):
> 
>    File "/home/sk/.kicad_plugins/action_viafence/viafence_action.py",
>  line 160, in Run
>  boardItem = self.boardObj.GetDrawings().GetFirst()
> 
>    File "/usr/lib/python2.7/dist-packages/pcbnew.py", line 18508, in
>  GetDrawings
>  def GetDrawings(self):return self.m_Drawings
> 
>    File "/usr/lib/python2.7/dist-packages/pcbnew.py", line 17803, in
>  
>  __getattr__ = lambda self, name: _swig_getattr(self, BOARD, name)
> 
>    File "/usr/lib/python2.7/dist-packages/pcbnew.py", line 74, in
>  _swig_getattr
>  return _swig_getattr_nondynamic(self, class_type, name, 0)
> 
>    File "/usr/lib/python2.7/dist-packages/pcbnew.py", line 69, in
>  _swig_getattr_nondynamic
>  return object.__getattr__(self, name)
> 
>  AttributeError: type object 'object' has no attribute '__getattr__'
> 
>  Best Regards
>  Simon
> 
>  ___
>  Mailing list: https://launchpad.net/~kicad-developers
>  Post to : kicad-developers@lists.launchpad.net
>  Unsubscribe : https://launchpad.net/~kicad-developers
>  More help   : https://help.launchpad.net/ListHelp
> 
> >>>
> >>> ___
> >>> Mailing list: https://launchpad.net/~kicad-developers
> >>> Post to : kicad-developers@lists.launchpad.net
> >>> Unsubscribe : https://launchpad.net/~kicad-developers
> >>> More help   : https://help.launchpad.net/ListHelp
> >>
> >>
> >>
> >> ___
> >> Mailing list: https://launchpad.net/~kicad-developers
> >> Post to : kicad-developers@lists.launchpad.net
> >> Unsubscribe : 

Re: [Kicad-developers] Pcbnew Python Interface breakage?

2017-06-26 Thread Maciej Sumiński
Great, thank you both for testing! I have just pushed the patch.

Maurice, you are right about the comment. It was already there, but
should have been removed.

Regards,
Orson

On 06/26/2017 05:16 PM, easyw wrote:
> Hi,
> 
> I solved with a trick
> try:
> board_drawings=board.GetDrawings()
> except:
> board_drawings=board.DrawingsList()
> 
> for drw in board_drawings:
> 
> for one plugin, and with a similar trick for the other;
> but your solution is cleaner.
> 
> is the
> diff --git a/pcbnew/swig/module.i b/pcbnew/swig/module.i
> correct?
> 
> I see there is a block comment before @line 45
> /*
> %extend MODULE
> ...
> 
> Applying the patch I cannot make any plugins running
> but if I de-comment that block it works...
> 
> 
> Thx
> Maurice
> 
> 
> On 06/26/2017 2:24 PM, Maciej Sumiński wrote:
>> Hi Maurice,
>>
>> This is due to the recent commit that enables iterators for DLISTs. We
>> have forgotten that such change impacts the Python interface.
>>
>> I propose to keep the old interface, otherwise we will face many reports
>> when a script works correctly with the stable release, but not with
>> nightlies.
>>
>> Would you check if the attached patch fixes the problem? If so, I will
>> push it.
>>
>> Regards,
>> Orson
>>
>> On 06/26/2017 10:23 AM, easyw wrote:
>>> Hi,
>>> I can confirm the same error on windows 10.
>>>
>>> I get also an other kind of error in my annular plugin that worked
>>> till now
>>>
>>> "for pad in module.Pads():
>>> TypeError 'SwigPyObject' object is not iterable"
>>>
>>> BR
>>> Maurice
>>>
>>> On 06/25/2017 5:46 PM, Simon Küppers wrote:
 Hi,
 I just updated KiCad on Linux Mint using the Launchpad PPA to test the
 new connection algorithm. However, a SWIG error starts to pop up in my
 python plugins.
 Right now I can produce the error, when calling GetDrawings on the
 board
 object (which worked a few days ago). It looks like the SWIG wrappers
 are desynchronized from the C++-code. Is that (at all) possible?

 This is the Traceback I get:

 
 Traceback (most recent call last):

   File "/home/sk/.kicad_plugins/action_viafence/viafence_action.py",
 line 160, in Run
 boardItem = self.boardObj.GetDrawings().GetFirst()

   File "/usr/lib/python2.7/dist-packages/pcbnew.py", line 18508, in
 GetDrawings
 def GetDrawings(self):return self.m_Drawings

   File "/usr/lib/python2.7/dist-packages/pcbnew.py", line 17803, in
 
 __getattr__ = lambda self, name: _swig_getattr(self, BOARD, name)

   File "/usr/lib/python2.7/dist-packages/pcbnew.py", line 74, in
 _swig_getattr
 return _swig_getattr_nondynamic(self, class_type, name, 0)

   File "/usr/lib/python2.7/dist-packages/pcbnew.py", line 69, in
 _swig_getattr_nondynamic
 return object.__getattr__(self, name)

 AttributeError: type object 'object' has no attribute '__getattr__'

 Best Regards
 Simon

 ___
 Mailing list: https://launchpad.net/~kicad-developers
 Post to : kicad-developers@lists.launchpad.net
 Unsubscribe : https://launchpad.net/~kicad-developers
 More help   : https://help.launchpad.net/ListHelp

>>>
>>> ___
>>> Mailing list: https://launchpad.net/~kicad-developers
>>> Post to : kicad-developers@lists.launchpad.net
>>> Unsubscribe : https://launchpad.net/~kicad-developers
>>> More help   : https://help.launchpad.net/ListHelp
>>
>>
>>
>> ___
>> Mailing list: https://launchpad.net/~kicad-developers
>> Post to : kicad-developers@lists.launchpad.net
>> Unsubscribe : https://launchpad.net/~kicad-developers
>> More help   : https://help.launchpad.net/ListHelp
>>




signature.asc
Description: OpenPGP digital signature
___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] Pcbnew Python Interface breakage?

2017-06-26 Thread Simon Küppers
Hi Orson,
The Patch works for me. Nice Thanks!

Best Regards
Simon

Am 26.06.2017 um 14:24 schrieb Maciej Sumiński:
> Hi Maurice,
> 
> This is due to the recent commit that enables iterators for DLISTs. We
> have forgotten that such change impacts the Python interface.
> 
> I propose to keep the old interface, otherwise we will face many reports
> when a script works correctly with the stable release, but not with
> nightlies.
> 
> Would you check if the attached patch fixes the problem? If so, I will
> push it.
> 
> Regards,
> Orson
> 
> On 06/26/2017 10:23 AM, easyw wrote:
>> Hi,
>> I can confirm the same error on windows 10.
>>
>> I get also an other kind of error in my annular plugin that worked till now
>>
>> "for pad in module.Pads():
>> TypeError 'SwigPyObject' object is not iterable"
>>
>> BR
>> Maurice
>>
>> On 06/25/2017 5:46 PM, Simon Küppers wrote:
>>> Hi,
>>> I just updated KiCad on Linux Mint using the Launchpad PPA to test the
>>> new connection algorithm. However, a SWIG error starts to pop up in my
>>> python plugins.
>>> Right now I can produce the error, when calling GetDrawings on the board
>>> object (which worked a few days ago). It looks like the SWIG wrappers
>>> are desynchronized from the C++-code. Is that (at all) possible?
>>>
>>> This is the Traceback I get:
>>>
>>> 
>>> Traceback (most recent call last):
>>>
>>>   File "/home/sk/.kicad_plugins/action_viafence/viafence_action.py",
>>> line 160, in Run
>>> boardItem = self.boardObj.GetDrawings().GetFirst()
>>>
>>>   File "/usr/lib/python2.7/dist-packages/pcbnew.py", line 18508, in
>>> GetDrawings
>>> def GetDrawings(self):return self.m_Drawings
>>>
>>>   File "/usr/lib/python2.7/dist-packages/pcbnew.py", line 17803, in
>>> 
>>> __getattr__ = lambda self, name: _swig_getattr(self, BOARD, name)
>>>
>>>   File "/usr/lib/python2.7/dist-packages/pcbnew.py", line 74, in
>>> _swig_getattr
>>> return _swig_getattr_nondynamic(self, class_type, name, 0)
>>>
>>>   File "/usr/lib/python2.7/dist-packages/pcbnew.py", line 69, in
>>> _swig_getattr_nondynamic
>>> return object.__getattr__(self, name)
>>>
>>> AttributeError: type object 'object' has no attribute '__getattr__'
>>>
>>> Best Regards
>>> Simon
>>>
>>> ___
>>> Mailing list: https://launchpad.net/~kicad-developers
>>> Post to : kicad-developers@lists.launchpad.net
>>> Unsubscribe : https://launchpad.net/~kicad-developers
>>> More help   : https://help.launchpad.net/ListHelp
>>>
>>
>> ___
>> Mailing list: https://launchpad.net/~kicad-developers
>> Post to : kicad-developers@lists.launchpad.net
>> Unsubscribe : https://launchpad.net/~kicad-developers
>> More help   : https://help.launchpad.net/ListHelp
> 
> 
> 
> ___
> Mailing list: https://launchpad.net/~kicad-developers
> Post to : kicad-developers@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
> 

___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] Pcbnew Python Interface breakage?

2017-06-26 Thread easyw

Hi,

I solved with a trick
try:
board_drawings=board.GetDrawings()
except:
board_drawings=board.DrawingsList()

for drw in board_drawings:

for one plugin, and with a similar trick for the other;
but your solution is cleaner.

is the
diff --git a/pcbnew/swig/module.i b/pcbnew/swig/module.i
correct?

I see there is a block comment before @line 45
/*
%extend MODULE
...

Applying the patch I cannot make any plugins running
but if I de-comment that block it works...


Thx
Maurice


On 06/26/2017 2:24 PM, Maciej Sumiński wrote:

Hi Maurice,

This is due to the recent commit that enables iterators for DLISTs. We
have forgotten that such change impacts the Python interface.

I propose to keep the old interface, otherwise we will face many reports
when a script works correctly with the stable release, but not with
nightlies.

Would you check if the attached patch fixes the problem? If so, I will
push it.

Regards,
Orson

On 06/26/2017 10:23 AM, easyw wrote:

Hi,
I can confirm the same error on windows 10.

I get also an other kind of error in my annular plugin that worked till now

"for pad in module.Pads():
TypeError 'SwigPyObject' object is not iterable"

BR
Maurice

On 06/25/2017 5:46 PM, Simon Küppers wrote:

Hi,
I just updated KiCad on Linux Mint using the Launchpad PPA to test the
new connection algorithm. However, a SWIG error starts to pop up in my
python plugins.
Right now I can produce the error, when calling GetDrawings on the board
object (which worked a few days ago). It looks like the SWIG wrappers
are desynchronized from the C++-code. Is that (at all) possible?

This is the Traceback I get:


Traceback (most recent call last):

  File "/home/sk/.kicad_plugins/action_viafence/viafence_action.py",
line 160, in Run
boardItem = self.boardObj.GetDrawings().GetFirst()

  File "/usr/lib/python2.7/dist-packages/pcbnew.py", line 18508, in
GetDrawings
def GetDrawings(self):return self.m_Drawings

  File "/usr/lib/python2.7/dist-packages/pcbnew.py", line 17803, in

__getattr__ = lambda self, name: _swig_getattr(self, BOARD, name)

  File "/usr/lib/python2.7/dist-packages/pcbnew.py", line 74, in
_swig_getattr
return _swig_getattr_nondynamic(self, class_type, name, 0)

  File "/usr/lib/python2.7/dist-packages/pcbnew.py", line 69, in
_swig_getattr_nondynamic
return object.__getattr__(self, name)

AttributeError: type object 'object' has no attribute '__getattr__'

Best Regards
Simon

___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp



___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp




___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp



___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] Pcbnew Python Interface breakage?

2017-06-26 Thread Maciej Sumiński
Hi Maurice,

This is due to the recent commit that enables iterators for DLISTs. We
have forgotten that such change impacts the Python interface.

I propose to keep the old interface, otherwise we will face many reports
when a script works correctly with the stable release, but not with
nightlies.

Would you check if the attached patch fixes the problem? If so, I will
push it.

Regards,
Orson

On 06/26/2017 10:23 AM, easyw wrote:
> Hi,
> I can confirm the same error on windows 10.
> 
> I get also an other kind of error in my annular plugin that worked till now
> 
> "for pad in module.Pads():
> TypeError 'SwigPyObject' object is not iterable"
> 
> BR
> Maurice
> 
> On 06/25/2017 5:46 PM, Simon Küppers wrote:
>> Hi,
>> I just updated KiCad on Linux Mint using the Launchpad PPA to test the
>> new connection algorithm. However, a SWIG error starts to pop up in my
>> python plugins.
>> Right now I can produce the error, when calling GetDrawings on the board
>> object (which worked a few days ago). It looks like the SWIG wrappers
>> are desynchronized from the C++-code. Is that (at all) possible?
>>
>> This is the Traceback I get:
>>
>> 
>> Traceback (most recent call last):
>>
>>   File "/home/sk/.kicad_plugins/action_viafence/viafence_action.py",
>> line 160, in Run
>> boardItem = self.boardObj.GetDrawings().GetFirst()
>>
>>   File "/usr/lib/python2.7/dist-packages/pcbnew.py", line 18508, in
>> GetDrawings
>> def GetDrawings(self):return self.m_Drawings
>>
>>   File "/usr/lib/python2.7/dist-packages/pcbnew.py", line 17803, in
>> 
>> __getattr__ = lambda self, name: _swig_getattr(self, BOARD, name)
>>
>>   File "/usr/lib/python2.7/dist-packages/pcbnew.py", line 74, in
>> _swig_getattr
>> return _swig_getattr_nondynamic(self, class_type, name, 0)
>>
>>   File "/usr/lib/python2.7/dist-packages/pcbnew.py", line 69, in
>> _swig_getattr_nondynamic
>> return object.__getattr__(self, name)
>>
>> AttributeError: type object 'object' has no attribute '__getattr__'
>>
>> Best Regards
>> Simon
>>
>> ___
>> Mailing list: https://launchpad.net/~kicad-developers
>> Post to : kicad-developers@lists.launchpad.net
>> Unsubscribe : https://launchpad.net/~kicad-developers
>> More help   : https://help.launchpad.net/ListHelp
>>
> 
> ___
> Mailing list: https://launchpad.net/~kicad-developers
> Post to : kicad-developers@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp

From 6dce744039e6991438e615d3cd5f84d9cb07b437 Mon Sep 17 00:00:00 2001
From: Maciej Suminski 
Date: Mon, 26 Jun 2017 14:22:32 +0200
Subject: [PATCH] Fix the BOARD & MODULE classes SWIG interface

---
 pcbnew/swig/board.i  | 3 +--
 pcbnew/swig/module.i | 3 +++
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/pcbnew/swig/board.i b/pcbnew/swig/board.i
index 62cbaed73..05d04d516 100644
--- a/pcbnew/swig/board.i
+++ b/pcbnew/swig/board.i
@@ -115,9 +115,8 @@ HANDLE_EXCEPTIONS(BOARD::TracksInNetBetweenPoints)
 %{
 
 def GetModules(self): return self.m_Modules
-def GetDrawings(self):return self.m_Drawings
+def GetDrawings(self):return self.DrawingsList()
 def GetTracks(self):  return self.m_Track
-def GetFullRatsnest(self):return self.m_FullRatsnest
 
 def Save(self,filename):
 return SaveBoard(filename,self,IO_MGR.KICAD)
diff --git a/pcbnew/swig/module.i b/pcbnew/swig/module.i
index b27376654..14274dde0 100644
--- a/pcbnew/swig/module.i
+++ b/pcbnew/swig/module.i
@@ -48,6 +48,9 @@
 %pythoncode
 %{
 
+def Pads(self):return self.PadsList()
+def GraphicalItems(self):  return self.GraphicalItemsList()
+
 #def SaveToLibrary(self,filename):
 #  return SaveModuleToLibrary(filename,self)
 
-- 
2.12.0



signature.asc
Description: OpenPGP digital signature
___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] Pcbnew Python Interface breakage?

2017-06-26 Thread Simon Küppers
Due to me not being able to imagine that problems regarding drawings
could be related to the connectivity algorithm, I started digging around
a bit.
I searched around the sourcecode for a while and it looks a bit
confusing regarding some of the Getter functions for returning objects
from the board object.
The now non-functional method GetDrawings() is actually implemented in
pcbnew/swig/board.i and is thus just available from Python.

I guess the reason it broke yesterday is that Tomasz pushed something
along his connectivity algorithm that is not (or is it?) related to the
connectivity algorithm. Have a look at this commit from 26. Sep 2016
that got pushed along with the stuff yesterday.
https://github.com/KiCad/kicad-source-mirror/commit/08314082dbdfdd634b6cdcaeb000b0e4c23adf26#diff-ce7955f5bf51c6f27b918fe0a0fc2b39

It looks like m_Drawings is now private (before it was public), hence
the reason for the python-only GetDrawings() failing (I presume).
With this change Tomasz also added DrawingsList() instead, with a hint
that it will again be deprecated and we should use Drawings() instead.
However as jsreynaud pointed out, a Python compatible
DLIST_ITERATOR_WRAPPER does not yet exist (or I cannot figure it out).

I am unsure whether the changes that Tomasz did were intentional
(because they are from last year and I cannot see the relation to the
connectivity algorithm) and whether we should completely switch over to
DrawingsList() and remove GetDrawings() from pcbnew/swig/board.i with
respect to python.

Maybe Tomasz can elaborate, because he seem to know some stuff about the
mentioned and planned board item storage refactoring.

Thanks everyone and Best Regards
Simon

Am 26.06.2017 um 12:27 schrieb reynaud:
> The new connectivity algorithm was pushed this last days. Big
> improvements, speed... But some changes in internal API...
> For the moment python API is (mostly) directly mapped to internal API...
> 
> 
> Le lundi 26 juin 2017 à 12:11 +0200, Simon Küppers a écrit :
>> Hey,
>> It works for me thanks. But what is the background here? Has someone
>> just changed the name of something in the Python API (are we supposed to
>> use DrawingsList() from now on) or is this just something like a workaround?
>>
>> Thanks
>> Simon
>>
>> Am 26.06.2017 um 12:03 schrieb reynaud:
>>> Hi, DrawingsList() is a good candidate ;) Le lundi 26 juin 2017 à
>>> 11:34 +0200, easyw a écrit :
 Hi Js, thx with PadsList() the script is fine now... Do you have any
 suggestion also for "for drw in board.GetDrawings(): GetDrawings def
 GetDrawings(self): return self.m_Drawings File ... AttributeError:
 type object 'object' has no attribute '__getattr__'" reference this
 action script
 https://github.com/easyw/kicad-action-plugins/blob/master/action_menu_move_to_layer.py
 thx Maurice On 06/26/2017 11:21 AM, reynaud wrote:
> Hi, Python interface is not stable. You can have some changes on
> daily build version. In your case, using PadsList() instead of
> Pads() should fix your issue. Le lundi 26 juin 2017 à 10:23 +0200,
> easyw a écrit :
>> Hi, I can confirm the same error on windows 10. I get also an
>> other kind of error in my annular plugin that worked till now "for
>> pad in module.Pads(): TypeError 'SwigPyObject' object is not
>> iterable" BR Maurice On 06/25/2017 5:46 PM, Simon Küppers wrote:
>>> Hi, I just updated KiCad on Linux Mint using the Launchpad PPA to
>>> test the new connection algorithm. However, a SWIG error starts
>>> to pop up in my python plugins. Right now I can produce the
>>> error, when calling GetDrawings on the board object (which worked
>>> a few days ago). It looks like the SWIG wrappers are
>>> desynchronized from the C++-code. Is that (at all) possible? This
>>> is the Traceback I get:  Traceback (most recent call last):
>>> File
>>> "/home/sk/.kicad_plugins/action_viafence/viafence_action.py",
>>> line 160, in Run boardItem =
>>> self.boardObj.GetDrawings().GetFirst() File
>>> "/usr/lib/python2.7/dist-packages/pcbnew.py", line 18508, in
>>> GetDrawings def GetDrawings(self): return self.m_Drawings File
>>> "/usr/lib/python2.7/dist-packages/pcbnew.py", line 17803, in
>>>  __getattr__ = lambda self, name: _swig_getattr(self,
>>> BOARD, name) File "/usr/lib/python2.7/dist-packages/pcbnew.py",
>>> line 74, in _swig_getattr return _swig_getattr_nondynamic(self,
>>> class_type, name, 0) File
>>> "/usr/lib/python2.7/dist-packages/pcbnew.py", line 69, in
>>> _swig_getattr_nondynamic return object.__getattr__(self, name)
>>> AttributeError: type object 'object' has no attribute
>>> '__getattr__' Best Regards Simon
>>> ___ Mailing list:
>>> https://launchpad.net/~kicad-developers Post to :
>>> kicad-developers@lists.launchpad.net
>>> 
>>> 

Re: [Kicad-developers] Pcbnew Python Interface breakage?

2017-06-26 Thread reynaud
The new connectivity algorithm was pushed this last days. Big
improvements, speed... But some changes in internal API...
For the moment python API is (mostly) directly mapped to internal
API...
Le lundi 26 juin 2017 à 12:11 +0200, Simon Küppers a écrit :
> Hey,
> It works for me thanks. But what is the background here? Has someone
> just changed the name of something in the Python API (are we supposed
> to
> use DrawingsList() from now on) or is this just something like a
> workaround?
> 
> Thanks
> Simon
> 
> Am 26.06.2017 um 12:03 schrieb reynaud:
> > 
> > Hi,
> > 
> > DrawingsList() is a good candidate ;)
> > 
> > 
> > Le lundi 26 juin 2017 à 11:34 +0200, easyw a écrit :
> > > 
> > > Hi Js,
> > > thx with PadsList() the script is fine now...
> > > 
> > > Do you have any suggestion also for
> > > 
> > > "for drw in board.GetDrawings():
> > > GetDrawings def GetDrawings(self): return self.m_Drawings File
> > > ...
> > > AttributeError: type object 'object' has no attribute
> > > '__getattr__'"
> > > 
> > > reference this action script
> > > https://github.com/easyw/kicad-action-plugins/blob/master/action_
> > > menu_move_to_layer.py
> > > 
> > > 
> > > thx
> > > Maurice
> > > 
> > > On 06/26/2017 11:21 AM, reynaud wrote:
> > > > 
> > > > Hi, Python interface is not stable. You can have some changes
> > > > on
> > > > daily build version. In your case, using PadsList() instead of
> > > > Pads()
> > > > should fix your issue. Le lundi 26 juin 2017 à 10:23 +0200,
> > > > easyw a
> > > > écrit :
> > > > > 
> > > > > Hi, I can confirm the same error on windows 10. I get also an
> > > > > other
> > > > > kind of error in my annular plugin that worked till now "for
> > > > > pad in
> > > > > module.Pads(): TypeError 'SwigPyObject' object is not
> > > > > iterable" BR
> > > > > Maurice On 06/25/2017 5:46 PM, Simon Küppers wrote:
> > > > > > 
> > > > > > Hi, I just updated KiCad on Linux Mint using the Launchpad
> > > > > > PPA to
> > > > > > test the new connection algorithm. However, a SWIG error
> > > > > > starts to
> > > > > > pop up in my python plugins. Right now I can produce the
> > > > > > error,
> > > > > > when calling GetDrawings on the board object (which worked
> > > > > > a few
> > > > > > days ago). It looks like the SWIG wrappers are
> > > > > > desynchronized from
> > > > > > the C++-code. Is that (at all) possible? This is the
> > > > > > Traceback I
> > > > > > get:  Traceback (most recent call last): File
> > > > > > "/home/sk/.kicad_plugins/action_viafence/viafence_action.py
> > > > > > ", line
> > > > > > 160, in Run boardItem =
> > > > > > self.boardObj.GetDrawings().GetFirst() File
> > > > > > "/usr/lib/python2.7/dist-packages/pcbnew.py", line 18508,
> > > > > > in
> > > > > > GetDrawings def GetDrawings(self): return self.m_Drawings
> > > > > > File
> > > > > > "/usr/lib/python2.7/dist-packages/pcbnew.py", line 17803,
> > > > > > in
> > > > > >  __getattr__ = lambda self, name:
> > > > > > _swig_getattr(self,
> > > > > > BOARD, name) File "/usr/lib/python2.7/dist-
> > > > > > packages/pcbnew.py",
> > > > > > line 74, in _swig_getattr return
> > > > > > _swig_getattr_nondynamic(self,
> > > > > > class_type, name, 0) File
> > > > > > "/usr/lib/python2.7/dist-packages/pcbnew.py", line 69, in
> > > > > > _swig_getattr_nondynamic return object.__getattr__(self,
> > > > > > name)
> > > > > > AttributeError: type object 'object' has no attribute
> > > > > > '__getattr__'
> > > > > > Best Regards Simon
> > > > > > ___
> > > > > > Mailing list: https://launchpad.net/~kicad-developers Post
> > > > > > to :
> > > > > > kicad-developers@lists.launchpad.net
> > > > > > kicad-developers@lists.launchpad.net>
> > > > > > kicad-developers@lists.launchpad.net> Unsubscribe :
> > > > > > https://launchpad.net/~kicad-developers More help :
> > > > > > https://help.launchpad.net/ListHelp 
> > > > > ___ Mailing list:
> > > > > https://launchpad.net/~kicad-developers Post to :
> > > > > kicad-developers@lists.launchpad.net
> > > > > kicad-developers@lists.launchpad.net>
> > > > > kicad-developers@lists.launchpad.net> Unsubscribe :
> > > > > https://launchpad.net/~kicad-developers More help :
> > > > > https://help.launchpad.net/ListHelp 
> > > > ___ Mailing list:
> > > > https://launchpad.net/~kicad-developers Post to :
> > > > kicad-developers@lists.launchpad.net
> > > > kicad-developers@lists.launchpad.net> Unsubscribe :
> > > > https://launchpad.net/~kicad-developers More help :
> > > > https://help.launchpad.net/ListHelp 
> > 
> > ___
> > Mailing list: https://launchpad.net/~kicad-developers
> > Post to : kicad-developers@lists.launchpad.net
> > Unsubscribe : https://launchpad.net/~kicad-developers
> > More help   : https://help.launchpad.net/ListHelp
> > 
> ___
> Mailing list: 

Re: [Kicad-developers] Pcbnew Python Interface breakage?

2017-06-26 Thread Simon Küppers
Hey,
It works for me thanks. But what is the background here? Has someone
just changed the name of something in the Python API (are we supposed to
use DrawingsList() from now on) or is this just something like a workaround?

Thanks
Simon

Am 26.06.2017 um 12:03 schrieb reynaud:
> Hi,
> 
> DrawingsList() is a good candidate ;)
> 
> 
> Le lundi 26 juin 2017 à 11:34 +0200, easyw a écrit :
>> Hi Js,
>> thx with PadsList() the script is fine now...
>>
>> Do you have any suggestion also for
>>
>> "for drw in board.GetDrawings():
>> GetDrawings def GetDrawings(self): return self.m_Drawings File
>> ...
>> AttributeError: type object 'object' has no attribute '__getattr__'"
>>
>> reference this action script
>> https://github.com/easyw/kicad-action-plugins/blob/master/action_menu_move_to_layer.py
>>
>>
>> thx
>> Maurice
>>
>> On 06/26/2017 11:21 AM, reynaud wrote:
>>> Hi, Python interface is not stable. You can have some changes on
>>> daily build version. In your case, using PadsList() instead of Pads()
>>> should fix your issue. Le lundi 26 juin 2017 à 10:23 +0200, easyw a
>>> écrit :
 Hi, I can confirm the same error on windows 10. I get also an other
 kind of error in my annular plugin that worked till now "for pad in
 module.Pads(): TypeError 'SwigPyObject' object is not iterable" BR
 Maurice On 06/25/2017 5:46 PM, Simon Küppers wrote:
> Hi, I just updated KiCad on Linux Mint using the Launchpad PPA to
> test the new connection algorithm. However, a SWIG error starts to
> pop up in my python plugins. Right now I can produce the error,
> when calling GetDrawings on the board object (which worked a few
> days ago). It looks like the SWIG wrappers are desynchronized from
> the C++-code. Is that (at all) possible? This is the Traceback I
> get:  Traceback (most recent call last): File
> "/home/sk/.kicad_plugins/action_viafence/viafence_action.py", line
> 160, in Run boardItem = self.boardObj.GetDrawings().GetFirst() File
> "/usr/lib/python2.7/dist-packages/pcbnew.py", line 18508, in
> GetDrawings def GetDrawings(self): return self.m_Drawings File
> "/usr/lib/python2.7/dist-packages/pcbnew.py", line 17803, in
>  __getattr__ = lambda self, name: _swig_getattr(self,
> BOARD, name) File "/usr/lib/python2.7/dist-packages/pcbnew.py",
> line 74, in _swig_getattr return _swig_getattr_nondynamic(self,
> class_type, name, 0) File
> "/usr/lib/python2.7/dist-packages/pcbnew.py", line 69, in
> _swig_getattr_nondynamic return object.__getattr__(self, name)
> AttributeError: type object 'object' has no attribute '__getattr__'
> Best Regards Simon ___
> Mailing list: https://launchpad.net/~kicad-developers Post to :
> kicad-developers@lists.launchpad.net
> 
>  Unsubscribe :
> https://launchpad.net/~kicad-developers More help :
> https://help.launchpad.net/ListHelp 
 ___ Mailing list:
 https://launchpad.net/~kicad-developers Post to :
 kicad-developers@lists.launchpad.net
 
  Unsubscribe :
 https://launchpad.net/~kicad-developers More help :
 https://help.launchpad.net/ListHelp 
>>> ___ Mailing list:
>>> https://launchpad.net/~kicad-developers Post to :
>>> kicad-developers@lists.launchpad.net
>>>  Unsubscribe :
>>> https://launchpad.net/~kicad-developers More help :
>>> https://help.launchpad.net/ListHelp 
> 
> 
> ___
> Mailing list: https://launchpad.net/~kicad-developers
> Post to : kicad-developers@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
> 

___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] Pcbnew Python Interface breakage?

2017-06-26 Thread reynaud
Yes,  DLIST_ITERATOR_WRAPPER is not yet in python interface.
Le lundi 26 juin 2017 à 11:36 +0200, Simon Küppers a écrit :
> Well, of course it is not stable. In the nightly builds, nothing is
> actually stable :-)
> 
> But I don't think there is a reason why these features are broken,
> and I
> think it might be a small oversight when someone else made changes
> and
> we should thus fix it.
> 
> Best Regards
> Simon
> 
> Am 26.06.2017 um 11:21 schrieb reynaud:
> > 
> > Hi,
> > 
> > Python interface is not stable. You can have some changes on daily
> > build
> > version.
> > In your case, using PadsList() instead of Pads() should fix your
> > issue.
> > 
> > 
> > Le lundi 26 juin 2017 à 10:23 +0200, easyw a écrit :
> > > 
> > > Hi,
> > > I can confirm the same error on windows 10.
> > > 
> > > I get also an other kind of error in my annular plugin that
> > > worked till now
> > > 
> > > "for pad in module.Pads():
> > > TypeError 'SwigPyObject' object is not iterable"
> > > 
> > > BR
> > > Maurice
> > > 
> > > On 06/25/2017 5:46 PM, Simon Küppers wrote:
> > > > 
> > > > Hi, I just updated KiCad on Linux Mint using the Launchpad PPA
> > > > to
> > > > test the new connection algorithm. However, a SWIG error starts
> > > > to
> > > > pop up in my python plugins. Right now I can produce the error,
> > > > when
> > > > calling GetDrawings on the board object (which worked a few
> > > > days
> > > > ago). It looks like the SWIG wrappers are desynchronized from
> > > > the
> > > > C++-code. Is that (at all) possible? This is the Traceback I
> > > > get:
> > > >  Traceback (most recent call last): File
> > > > "/home/sk/.kicad_plugins/action_viafence/viafence_action.py",
> > > > line
> > > > 160, in Run boardItem = self.boardObj.GetDrawings().GetFirst()
> > > > File
> > > > "/usr/lib/python2.7/dist-packages/pcbnew.py", line 18508, in
> > > > GetDrawings def GetDrawings(self): return self.m_Drawings File
> > > > "/usr/lib/python2.7/dist-packages/pcbnew.py", line 17803, in
> > > > 
> > > > __getattr__ = lambda self, name: _swig_getattr(self, BOARD,
> > > > name)
> > > > File "/usr/lib/python2.7/dist-packages/pcbnew.py", line 74, in
> > > > _swig_getattr return _swig_getattr_nondynamic(self, class_type,
> > > > name,
> > > > 0) File "/usr/lib/python2.7/dist-packages/pcbnew.py", line 69,
> > > > in
> > > > _swig_getattr_nondynamic return object.__getattr__(self, name)
> > > > AttributeError: type object 'object' has no attribute
> > > > '__getattr__'
> > > > Best Regards Simon
> > > > ___
> > > > Mailing list: https://launchpad.net/~kicad-developers Post to :
> > > > kicad-developers@lists.launchpad.net
> > > > kicad-developers@lists.launchpad.net> Unsubscribe :
> > > > https://launchpad.net/~kicad-developers More help :
> > > > https://help.launchpad.net/ListHelp 
> > > 
> > > ___
> > > Mailing list: https://launchpad.net/~kicad-developers
> > > Post to : kicad-developers@lists.launchpad.net 
> > > develop...@lists.launchpad.net>
> > > Unsubscribe : https://launchpad.net/~kicad-developers
> > > More help   : https://help.launchpad.net/ListHelp
> > 
> > ___
> > Mailing list: https://launchpad.net/~kicad-developers
> > Post to : kicad-developers@lists.launchpad.net
> > Unsubscribe : https://launchpad.net/~kicad-developers
> > More help   : https://help.launchpad.net/ListHelp
> > 
> ___
> Mailing list: https://launchpad.net/~kicad-developers
> Post to : kicad-developers@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] Pcbnew Python Interface breakage?

2017-06-26 Thread reynaud
Hi,
DrawingsList() is a good candidate ;)
Le lundi 26 juin 2017 à 11:34 +0200, easyw a écrit :
> Hi Js,
> thx with PadsList() the script is fine now...
> 
> Do you have any suggestion also for
> 
> "for drw in board.GetDrawings():
> GetDrawings def GetDrawings(self): return self.m_Drawings File
> ...
> AttributeError: type object 'object' has no attribute '__getattr__'"
> 
> reference this action script
> https://github.com/easyw/kicad-action-plugins/blob/master/action_menu
> _move_to_layer.py
> 
> 
> thx
> Maurice
> 
> On 06/26/2017 11:21 AM, reynaud wrote:
> > 
> > Hi,
> > 
> > Python interface is not stable. You can have some changes on daily
> > build
> > version.
> > In your case, using PadsList() instead of Pads() should fix your
> > issue.
> > 
> > 
> > Le lundi 26 juin 2017 à 10:23 +0200, easyw a écrit :
> > > 
> > > Hi,
> > > I can confirm the same error on windows 10.
> > > 
> > > I get also an other kind of error in my annular plugin that
> > > worked till now
> > > 
> > > "for pad in module.Pads():
> > > TypeError 'SwigPyObject' object is not iterable"
> > > 
> > > BR
> > > Maurice
> > > 
> > > On 06/25/2017 5:46 PM, Simon Küppers wrote:
> > > > 
> > > > Hi, I just updated KiCad on Linux Mint using the Launchpad PPA
> > > > to
> > > > test the new connection algorithm. However, a SWIG error starts
> > > > to
> > > > pop up in my python plugins. Right now I can produce the error,
> > > > when
> > > > calling GetDrawings on the board object (which worked a few
> > > > days
> > > > ago). It looks like the SWIG wrappers are desynchronized from
> > > > the
> > > > C++-code. Is that (at all) possible? This is the Traceback I
> > > > get:
> > > >  Traceback (most recent call last): File
> > > > "/home/sk/.kicad_plugins/action_viafence/viafence_action.py",
> > > > line
> > > > 160, in Run boardItem = self.boardObj.GetDrawings().GetFirst()
> > > > File
> > > > "/usr/lib/python2.7/dist-packages/pcbnew.py", line 18508, in
> > > > GetDrawings def GetDrawings(self): return self.m_Drawings File
> > > > "/usr/lib/python2.7/dist-packages/pcbnew.py", line 17803, in
> > > > 
> > > > __getattr__ = lambda self, name: _swig_getattr(self, BOARD,
> > > > name)
> > > > File "/usr/lib/python2.7/dist-packages/pcbnew.py", line 74, in
> > > > _swig_getattr return _swig_getattr_nondynamic(self, class_type,
> > > > name,
> > > > 0) File "/usr/lib/python2.7/dist-packages/pcbnew.py", line 69,
> > > > in
> > > > _swig_getattr_nondynamic return object.__getattr__(self, name)
> > > > AttributeError: type object 'object' has no attribute
> > > > '__getattr__'
> > > > Best Regards Simon
> > > > ___
> > > > Mailing list: https://launchpad.net/~kicad-developers Post to :
> > > > kicad-developers@lists.launchpad.net
> > > > kicad-developers@lists.launchpad.net> Unsubscribe :
> > > > https://launchpad.net/~kicad-developers More help :
> > > > https://help.launchpad.net/ListHelp
> > > 
> > > ___
> > > Mailing list: https://launchpad.net/~kicad-developers
> > > Post to : kicad-developers@lists.launchpad.net
> > > kicad-developers@lists.launchpad.net>
> > > Unsubscribe : https://launchpad.net/~kicad-developers
> > > More help   : https://help.launchpad.net/ListHelp
> > 
> > ___
> > Mailing list: https://launchpad.net/~kicad-developers
> > Post to : kicad-developers@lists.launchpad.net
> > Unsubscribe : https://launchpad.net/~kicad-developers
> > More help   : https://help.launchpad.net/ListHelp
> > ___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] Pcbnew Python Interface breakage?

2017-06-26 Thread Simon Küppers
Well, of course it is not stable. In the nightly builds, nothing is
actually stable :-)

But I don't think there is a reason why these features are broken, and I
think it might be a small oversight when someone else made changes and
we should thus fix it.

Best Regards
Simon

Am 26.06.2017 um 11:21 schrieb reynaud:
> Hi,
> 
> Python interface is not stable. You can have some changes on daily build
> version.
> In your case, using PadsList() instead of Pads() should fix your issue.
> 
> 
> Le lundi 26 juin 2017 à 10:23 +0200, easyw a écrit :
>> Hi,
>> I can confirm the same error on windows 10.
>>
>> I get also an other kind of error in my annular plugin that worked till now
>>
>> "for pad in module.Pads():
>> TypeError 'SwigPyObject' object is not iterable"
>>
>> BR
>> Maurice
>>
>> On 06/25/2017 5:46 PM, Simon Küppers wrote:
>>> Hi, I just updated KiCad on Linux Mint using the Launchpad PPA to
>>> test the new connection algorithm. However, a SWIG error starts to
>>> pop up in my python plugins. Right now I can produce the error, when
>>> calling GetDrawings on the board object (which worked a few days
>>> ago). It looks like the SWIG wrappers are desynchronized from the
>>> C++-code. Is that (at all) possible? This is the Traceback I get:
>>>  Traceback (most recent call last): File
>>> "/home/sk/.kicad_plugins/action_viafence/viafence_action.py", line
>>> 160, in Run boardItem = self.boardObj.GetDrawings().GetFirst() File
>>> "/usr/lib/python2.7/dist-packages/pcbnew.py", line 18508, in
>>> GetDrawings def GetDrawings(self): return self.m_Drawings File
>>> "/usr/lib/python2.7/dist-packages/pcbnew.py", line 17803, in 
>>> __getattr__ = lambda self, name: _swig_getattr(self, BOARD, name)
>>> File "/usr/lib/python2.7/dist-packages/pcbnew.py", line 74, in
>>> _swig_getattr return _swig_getattr_nondynamic(self, class_type, name,
>>> 0) File "/usr/lib/python2.7/dist-packages/pcbnew.py", line 69, in
>>> _swig_getattr_nondynamic return object.__getattr__(self, name)
>>> AttributeError: type object 'object' has no attribute '__getattr__'
>>> Best Regards Simon ___
>>> Mailing list: https://launchpad.net/~kicad-developers Post to :
>>> kicad-developers@lists.launchpad.net
>>>  Unsubscribe :
>>> https://launchpad.net/~kicad-developers More help :
>>> https://help.launchpad.net/ListHelp 
>>
>>
>> ___
>> Mailing list: https://launchpad.net/~kicad-developers
>> Post to : kicad-developers@lists.launchpad.net 
>> 
>> Unsubscribe : https://launchpad.net/~kicad-developers
>> More help   : https://help.launchpad.net/ListHelp
> 
> 
> ___
> Mailing list: https://launchpad.net/~kicad-developers
> Post to : kicad-developers@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
> 

___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] Pcbnew Python Interface breakage?

2017-06-26 Thread easyw

Hi Js,
thx with PadsList() the script is fine now...

Do you have any suggestion also for

"for drw in board.GetDrawings():
GetDrawings def GetDrawings(self): return self.m_Drawings File
...
AttributeError: type object 'object' has no attribute '__getattr__'"

reference this action script
https://github.com/easyw/kicad-action-plugins/blob/master/action_menu_move_to_layer.py


thx
Maurice

On 06/26/2017 11:21 AM, reynaud wrote:

Hi,

Python interface is not stable. You can have some changes on daily build
version.
In your case, using PadsList() instead of Pads() should fix your issue.


Le lundi 26 juin 2017 à 10:23 +0200, easyw a écrit :

Hi,
I can confirm the same error on windows 10.

I get also an other kind of error in my annular plugin that worked till now

"for pad in module.Pads():
TypeError 'SwigPyObject' object is not iterable"

BR
Maurice

On 06/25/2017 5:46 PM, Simon Küppers wrote:

Hi, I just updated KiCad on Linux Mint using the Launchpad PPA to
test the new connection algorithm. However, a SWIG error starts to
pop up in my python plugins. Right now I can produce the error, when
calling GetDrawings on the board object (which worked a few days
ago). It looks like the SWIG wrappers are desynchronized from the
C++-code. Is that (at all) possible? This is the Traceback I get:
 Traceback (most recent call last): File
"/home/sk/.kicad_plugins/action_viafence/viafence_action.py", line
160, in Run boardItem = self.boardObj.GetDrawings().GetFirst() File
"/usr/lib/python2.7/dist-packages/pcbnew.py", line 18508, in
GetDrawings def GetDrawings(self): return self.m_Drawings File
"/usr/lib/python2.7/dist-packages/pcbnew.py", line 17803, in 
__getattr__ = lambda self, name: _swig_getattr(self, BOARD, name)
File "/usr/lib/python2.7/dist-packages/pcbnew.py", line 74, in
_swig_getattr return _swig_getattr_nondynamic(self, class_type, name,
0) File "/usr/lib/python2.7/dist-packages/pcbnew.py", line 69, in
_swig_getattr_nondynamic return object.__getattr__(self, name)
AttributeError: type object 'object' has no attribute '__getattr__'
Best Regards Simon ___
Mailing list: https://launchpad.net/~kicad-developers Post to :
kicad-developers@lists.launchpad.net
 Unsubscribe :
https://launchpad.net/~kicad-developers More help :
https://help.launchpad.net/ListHelp



___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net

Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp



___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp



___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] Pcbnew Python Interface breakage?

2017-06-26 Thread reynaud
Hi,
Python interface is not stable. You can have some changes on daily
build version.
In your case, using PadsList() instead of Pads() should fix your issue.
Le lundi 26 juin 2017 à 10:23 +0200, easyw a écrit :
> Hi,
> I can confirm the same error on windows 10.
> 
> I get also an other kind of error in my annular plugin that worked
> till now
> 
> "for pad in module.Pads():
> TypeError 'SwigPyObject' object is not iterable"
> 
> BR
> Maurice
> 
> On 06/25/2017 5:46 PM, Simon Küppers wrote:
> > 
> > Hi,
> > I just updated KiCad on Linux Mint using the Launchpad PPA to test
> > the
> > new connection algorithm. However, a SWIG error starts to pop up in
> > my
> > python plugins.
> > Right now I can produce the error, when calling GetDrawings on the
> > board
> > object (which worked a few days ago). It looks like the SWIG
> > wrappers
> > are desynchronized from the C++-code. Is that (at all) possible?
> > 
> > This is the Traceback I get:
> > 
> > 
> > Traceback (most recent call last):
> > 
> >   File
> > "/home/sk/.kicad_plugins/action_viafence/viafence_action.py",
> > line 160, in Run
> > boardItem = self.boardObj.GetDrawings().GetFirst()
> > 
> >   File "/usr/lib/python2.7/dist-packages/pcbnew.py", line 18508, in
> > GetDrawings
> > def GetDrawings(self):return self.m_Drawings
> > 
> >   File "/usr/lib/python2.7/dist-packages/pcbnew.py", line 17803, in
> > 
> > __getattr__ = lambda self, name: _swig_getattr(self, BOARD,
> > name)
> > 
> >   File "/usr/lib/python2.7/dist-packages/pcbnew.py", line 74, in
> > _swig_getattr
> > return _swig_getattr_nondynamic(self, class_type, name, 0)
> > 
> >   File "/usr/lib/python2.7/dist-packages/pcbnew.py", line 69, in
> > _swig_getattr_nondynamic
> > return object.__getattr__(self, name)
> > 
> > AttributeError: type object 'object' has no attribute '__getattr__'
> > 
> > Best Regards
> > Simon
> > 
> > ___
> > Mailing list: https://launchpad.net/~kicad-developers
> > Post to : kicad-developers@lists.launchpad.net
> > Unsubscribe : https://launchpad.net/~kicad-developers
> > More help   : https://help.launchpad.net/ListHelp
> > 
> ___
> Mailing list: https://launchpad.net/~kicad-developers
> Post to : kicad-developers@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] Pcbnew Python Interface breakage?

2017-06-26 Thread easyw

Hi,
I can confirm the same error on windows 10.

I get also an other kind of error in my annular plugin that worked till now

"for pad in module.Pads():
TypeError 'SwigPyObject' object is not iterable"

BR
Maurice

On 06/25/2017 5:46 PM, Simon Küppers wrote:

Hi,
I just updated KiCad on Linux Mint using the Launchpad PPA to test the
new connection algorithm. However, a SWIG error starts to pop up in my
python plugins.
Right now I can produce the error, when calling GetDrawings on the board
object (which worked a few days ago). It looks like the SWIG wrappers
are desynchronized from the C++-code. Is that (at all) possible?

This is the Traceback I get:


Traceback (most recent call last):

  File "/home/sk/.kicad_plugins/action_viafence/viafence_action.py",
line 160, in Run
boardItem = self.boardObj.GetDrawings().GetFirst()

  File "/usr/lib/python2.7/dist-packages/pcbnew.py", line 18508, in
GetDrawings
def GetDrawings(self):return self.m_Drawings

  File "/usr/lib/python2.7/dist-packages/pcbnew.py", line 17803, in 
__getattr__ = lambda self, name: _swig_getattr(self, BOARD, name)

  File "/usr/lib/python2.7/dist-packages/pcbnew.py", line 74, in
_swig_getattr
return _swig_getattr_nondynamic(self, class_type, name, 0)

  File "/usr/lib/python2.7/dist-packages/pcbnew.py", line 69, in
_swig_getattr_nondynamic
return object.__getattr__(self, name)

AttributeError: type object 'object' has no attribute '__getattr__'

Best Regards
Simon

___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp



___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] [PATCH] renamed eeschema right click menu "copy" into "duplicate" and some more

2017-06-26 Thread Fabrizio Tappero
hi Wayne,
ctrld-d was chosen for UI consistancy as discussed previously. "Control D"
is aready "Duplicate" in PCB new and it seems a good thing to me.

I will try to resubmit this patch with the changes you propose.

cheers
Fabrizio




On Fri, Jun 23, 2017 at 8:00 PM, Wayne Stambaugh 
wrote:

> Fabrizio,
>
> I took a look at this patch and have a few comments.
>
> It will need to be rebased since I've already removed the hierarchy tool
> and all related code.
>
> The ctrl-d hotkey is already used in pcbnew so I don't think changing it
> in eeschema makes sense.  I would keep 'C' in eeschema for consistency.
>
> I'm OK with the icon changes and the terminology change form "Copy" to
> "Duplicate".
>
> Thanks,
>
> Wayne
>
> On 6/20/2017 6:02 AM, Fabrizio Tappero wrote:
> > Hello,
> > following up on the recent proposal to rename the eeschema "copy"
> > command into "duplicate" and its shortcut I am sending this patch.
> >
> > Specifically this patch does the following:
> >
> > 1) rename eeschema right click menu item "Copy" into "Duplicate"
> > 2) rename eeschema right click menu item "Save block" into "Copy block"
> > 3) change "Duplicate" shortcut from "C" to "Ctrl-D"
> > 4) change eeschema right click menu item "Duplicate" icon from a copy
> > icon into a duplicate
> > 5) deletes right vertical toolbar "ascend/descend hierarchy" icon and
> > its unnecessary code. Please make sure I deleted all of it.
> > 6) replace few redundant icons in the eeschema right click menu into
> > more global icon (now global move icon)
> > 7) replace the "mirror_footprint_axisX.svg" for a more standard
> > "mirror" global icon.
> > 8) replaced eeschema right click menu "delete_text" icon with more
> > global "delete" icon
> >
> >
> > Cheers
> > Fabrizio
> >
> >
> >
> > ___
> > Mailing list: https://launchpad.net/~kicad-developers
> > Post to : kicad-developers@lists.launchpad.net
> > Unsubscribe : https://launchpad.net/~kicad-developers
> > More help   : https://help.launchpad.net/ListHelp
> >
>
>
> ___
> Mailing list: https://launchpad.net/~kicad-developers
> Post to : kicad-developers@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
>
___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] [PATCH] correct text inside two importantplot windows

2017-06-26 Thread Fabrizio Tappero
hi Wayne,
sure, no problem. I will fix this patch and send it back to you.

cheers
Fabrizio


On Fri, Jun 23, 2017 at 6:45 PM, Wayne Stambaugh 
wrote:

> On 6/22/2017 3:48 AM, Fabrizio Tappero wrote:
> > Hi Wayne,
> > thanks for taking the time to review this.
> > ​I'll certainly review the changes you proposel​.
> > I am
> > ​ just​
> > a little unsure abut the use of colon. This is the present version of
> > the plot window
> > ​:​
> >
> > ​Inline image 1​
> >
> > Are you suggesting that "Plot format:" should get a colon but "Options"
> > or "Gerber Options" should not?
>
> That is correct.  Labels is a group box (wxStaticBoxSizer) should not
> end with a colon.  Labels (wxStaticText) that precede another control
> such as a text edit control should end with a colong.
>
> >
> > thanks
> > Fabrizio
> >
> >
> >
> >
> >
> >
> >
> >
> > On Wed, Jun 21, 2017 at 8:04 PM, Diego Herranz
> > >
> > wrote:
> >
> > Hi,
> >
> > Random comments for a few of the topics discussed or proposed:
> >
> > - "Format" -> "Coordinate Format": The Gerber standard
> >  file_format_specification.pdf> uses
> > Coordinate format for this, so I think this change is OK.
> >
> > - "solder mask" vs "solder stop mask": I'm European and I've never
> > used (or heard used) "solder stop mask". Always solder mask or I've
> > also used resist or solder resist. But I think solder mask is the
> > most common.
> >
> > - "Save Messages to File": +1
> >
> > - "Default line width" -> "Line width": please don't. The former is
> > more descriptive and correct in my opinion.
> >
> > Thanks,
> >
> > Diego
> >
> > On Wed, Jun 21, 2017 at 5:59 PM, Wayne Stambaugh
> > > wrote:
> >
> > Fabrizio,
> >
> > I finally had a chance to look at this.  Here are my comments.
> >
> > You fixed the capitalization for some labels but broke it for
> > others.
> > Please take a look at the "Capitalization Table" section in the
> > KiCad
> > "User Interface Guidelines" [1] and make the appropriate changes.
> >
> > For the most part we do not use colons (:) at the end of group
> box
> > label.  I know we are not as consistent with this as we should
> > be but
> > most of the dialogs do not use them.  We should probably make
> > this a UI
> > policy.  Text labels for other controls should have a colon at
> > the end.
> >
> > I don't think the wording change from "Current solder mask
> > settings" to
> > "Solder Stop Mask Options" is very good.  Here in the states, I
> > cannot
> > ever remember some referring to solder mask as solder stop
> > mask.  Maybe
> > this is a European thing.
> >
> > The "Save Output" button could be more descriptive.  The
> > previous label
> > was better (although capitalized incorrectly).  Perhaps "Save
> > Messages
> > to File" would be better.
> >
> > Everything else seems fine to me.
> >
> > Cheers,
> >
> > Wayne
> >
> >
> > [1]:
> > http://docs.kicad-pcb.org/doxygen/md_Documentation_
> development_ui-policy.html
> >  development_ui-policy.html>
> >
> > On 6/9/2017 6:43 AM, Fabrizio Tappero wrote:
> > > things like
> > >
> > > Options => Options:
> > > 4.5 (unit mm) => 4.5, unit mm
> > > Messages => Output Mesages:
> > > Save report to file... => Save Output
> > > Capital letters, shorten sentences, etc
> > >
> > > Please refer to the patch for a detailed
> > >
> > > cheers
> > > Fabrizio
> > >
> > >
> > > On Fri, Jun 9, 2017 at 12:31 AM, liyoubdu  
> > > >> wrote:
> > >
> > >
> > > It is not obvious what you changed here
> > > ---Original---
> > > *From:* "Nick Østergaard" >   > >>
> > > *Date:* 2017/6/9 00:39:01
> > > *To:* "Fabrizio Tappero" > 
> > >  > >>;
> > > *Cc:* "KiCad
> > Developers" > 
> > >  >