kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #31894
Re: Getting kicad to work with wxPython Phoenix
-
To:
<mail@xxxxxxxxxx>, <kicad-developers@xxxxxxxxxxxxxxxxxxx>
-
From:
Tomasz Wlostowski <tomasz.wlostowski@xxxxxxx>
-
Date:
Thu, 23 Nov 2017 17:37:23 +0100
-
Authentication-results:
spf=pass (sender IP is 188.184.36.46) smtp.mailfrom=cern.ch; lists.launchpad.net; dkim=none (message not signed) header.d=none;lists.launchpad.net; dmarc=bestguesspass action=none header.from=cern.ch;
-
In-reply-to:
<CAH3vBSR8mjZ-wj4PxYnWXC2dcqSWbAbM72kji+ygFh=j3GOLmQ@mail.gmail.com>
-
Spamdiagnosticmetadata:
NSPM
-
Spamdiagnosticoutput:
1:99
-
User-agent:
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0
On 23/11/17 16:17, miles mccoo wrote:
>
> PS - AFAIK, the patch that triggered mention of dumping python due to
> wxPython still hasn't been denied or merged. :-)
> https://lists.launchpad.net/kicad-developers/msg31700.html
>
>
Hi Miles,
I just committed your patch. Thanks for your contribution to Kicad.
Now, if you want to improve Kicad scripting support (and I guess you do
;-), there's a bunch of tasks to do right away:
- glue between wxPoint and VECTOR2I and swigging out SHAPE_POLY_SET, SEG
and VECTOR2<> classes (see
https://bugs.launchpad.net/kicad/+bug/1728611). In the longer term, we
plan to use
VECTOR2Is in non-GUI related code, but until the legacy canvas is
factored out we must live with both types mixed.
- expose GAL SELECTION/SELECTION_TOOL through a simple python interface,
e.g:
pcbnew.SelectItems( [ item/list of items ] )
pcbnew.UnselectItems( [ item/list of items ] )
pcbnew.GetSelection()
pcbnew.ClearSelection()
- expose COMMIT/BOARD_COMMIT classes to enable undo & view updates (as
requested by other Python devs on the Kicad Forum):
# modification of a via diameter and adding a track. "via" comes from
the existing BOARD object, track is a new item created by the script
commit = pcbnew.COMMIT()
# inform PCBnew that we're going to modify the via object
commit.Modify(via)
via.SetDiameter()
track = TRACK()
track.SetStart(...)
track.SetEnd(...)
# add a new item (track) to the commit
commit.Add(track)
# push the commit - this will update the board view, connectivity
(ratsnest), commit changes to the BOARD object and create an entry in
the undo buffer
commit.Push("Change a via and add a new track")
- add simple calls to enable/disable visible layers/items
(https://bugs.launchpad.net/kicad/+bug/1712233,
https://lists.launchpad.net/kicad-developers/msg30372.html)
Tom
References