← Back to team overview

kicad-developers team mailing list archive

Re: PCB API and pcbnew_scripting_helpers

 

On 7/9/2016 12:45 AM, Cirilo Bernardo wrote:
> I'm working on a plan to implement a PCB API as a step towards
> implementing an Export Plugin which uses dynamically loaded
> code in a manner similar to the current 3D Plugin scheme.
> 
> As part of the API, a number of basic functions are required:
> + obtain a pointer to the current BOARD (if any)
> + load a BOARD
> + save a BOARD
> + create a new BOARD
> + close the current BOARD

Are you talking about changing the Pcbnew IO_MGR code to use dynamically
loaded plugins instead of compiled in plugins?  If so, you must
implement the entire PLUGIN API which includes handling footprint
libraries not just board files.  Please do not change this API as it is
used extensively throughout Pcbnew.  There is no reason to create a
separate API for python, you can already access the PLUGIN API with
Python.  I just opened a Python console and loaded a board file using
the IO_MGR and PLUGIN objects.

> 
> I noticed that the pcbner_scripting_helpers.{cpp,h} implement
> the LOAD/SAVE part for use by the Python interface. Since
> these functions will also be required by a PCB API, could
> we rework those files so that they are always compiled into
> kicad? I would like to ensure those functions are always
> compiled and gradually add to them to create a base from
> which to start the PCB API.

I rather you used the existing PLUGIN API.  I'm not even sure why this
code exists.  Why do we need multiple board and footprint library
handlers?  I'm a bit confused as to why this is even necessary.

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


Follow ups

References