← Back to team overview

kicad-developers team mailing list archive

plugins and the import/export features

 

I've been thinking about the various import/export features and looking
into whether some
refactoring is worthwhile to decouple the code via a scheme similar to the
IO_MGR plugin.
I was also thinking maybe the IO_MGR plugin itself might be used but
eventually decided
against that since the features really are better described as an
Import/Export rather than
a Load/Save.

I have made a few notes about the current state of Import and Export
features and
would appreciate any comments on the idea of refactoring these into a
plugin. My
preliminary notes are reproduced here:

Notes on the refactoring of Import / Export modules:
----------------------------------------------------

Items currently under Import:
    + Specctra session
    + DXF

Items currently under Export:
    + Specctra DSN
    + GenCAD
    + VRML
    + IDFv3

Comments on existing features:
    + DXF: Although there is an import, production of
      DXF files from within KiCad is via Plot. Does it make
      sense to retain the plot function as an unrelated entity
      or should an Import/Export API be used and the "Export"
      simply brings up the appropriate Plot dialog?
    + SVG: There is an Export SVG within the File menu
      under the print features section. This is a shortcut
      to File->Plot->(SVG Format). Should this be retained
      or removed? Should this be labeled as an 'Export' at all,
      in which case it can be treated in a similar fashion to DXF?
      Is there a corresponding 'Import' function somewhere or
      is it likely that there will ever be one?
    + Specctra: Although the files created are different from
      the files being read into KiCad, does it make sense to
      put both of these operations under an Import/Export API
      or will the operation be unclear? (After all a Specctra
      DSN file is exported and a Session file is imported.)
    + GenCAD: At the moment we export GenCAD; are we likely to
      ever import GenCAD?
    + VRML: There will never be a VRML Import since this makes
      no sense at all; however putting it into an Import/Export
      API (plugin) makes sense since the decoupling from the
      pcbnew code will be cleaner.
    + IDFv3: The current IDF framework actually makes it
      possible to import an IDF file even though no one has yet
      requested this feature. In an Import/Export plugin it
      should only be necessary to extend the IDF plugin to
      provide the Import feature.


- Cirilo

Follow ups