Git Product home page Git Product logo

kicad-librarian's Introduction

KiCad-Librarian

The KiCad Librarian allows you to view footprints and schematic symbols in KiCad libraries, and move or copy footprints & symbols from one library to another. It allows you to scan all libraries in a list, so that you can check for duplicates or naming conflicts. It supports a repository for central storage (and sharing) of symbols and footprints.

A run-through of the Librarian is posted on YouTube: https://www.youtube.com/watch?v=sDICxGqsZC8

Parameters for a footprint, such as pad sizes, shapes and pitch, can be adjusted by changing values in a property table. This works for new footprints (created from one of several templates) and for existing footprints (even those that were not initially created by the Librarian). If a template is present, the Librarian also creates (or adjusts) a 3D model for the package.

With the goal of consistency in a library of footprints, the Librarian calculates essential metrics of pad sizes, spans and pitch. It provides a comparison mode where you can overlay two footprints for a visual comparison of the parameters. (A visual comparison of schematic symbols is also supported.)

For symbols, the pin types, shapes and positions can be adjusted. In the same way as for footprints, you can create new symbols from a template. Pin numbers and descriptions can be imported from the clipboard and/or conveniently edited in a table.

Additionally, the KiCad Librarian can create a report of all parts in a library. The reports contain the essential statistics of the parts. For footprints, this includes a drawing of the footprint and the pitch and pad size parameters; for symbols, it includes alias names and the list of applicable footprints.

With KiCad alone, you can do all of the above, too (except for the reports). This Librarian was developed to make managing the libraries more convenient. For example, instead of needing to "export" a symbol from one library and then to "import" it into the other, the KiCad Librarian allows you to open two libraries at once, and to copy the symbol from one into the other in a single operation. Another example: if you want to make the pads of a 48-pin QFP a tenth of a millimetre narrower, you need only to adjust a single value to change all 48 pads at once.

Footprint library management now also means footprint conversion. KiCad footprints exist in three formats (legacy-mils, legacy-mm and s-expressions), and all three formats are used interchangeably. When moving a footprint from one library to another, the footprint data may need to be converted. The Librarian does this automatically while copying or moving footprints.

Requirements

The KiCad Librarian is built with CMake and uses the wxWidgets toolkit. The PDF reports are generated with the Haru PDF library ("libharu"). To parse the VRML models, the Librarian uses CyberX3D. For the access to the remote repository, the Librarian uses the Curl library. Therefore, the extra requirements are:

  • wxWidgets
  • Haru PDF library
  • Curl library (optional, see below)
  • CyberX3D library (optional, see below)
  • CMake

Building with CMake

The easiest way to build the software is probably to build it in the root of this source archive, which is the directory that this README is in. Then, you can type

cmake-gui src

and generate the makefile.

Two of the settings that CMake will show before generating the makefile, are KiCadLibrarian_USE_CURL and KiCadLibrarian_USE_CX3D. If you have selected "Grouped" visualization of the option tree, these options are below the topic KiCadLibrarian. Both options have checkmark in them by default. If you remove the checkmarks, the KiCad Librarian will be built without the ability to access a remote repository and/or without the ability to display 3D models. The respective libraries (libCURL and CyberX3D) are then no longer needed either.

If you want to use the "make install" command, one of the settings that you should change in the CMake GUI is CMAKE_INSTALL_PREFIX. By default, it is set to "/opt/kicadlibrarian" (on Linux), but you may want to change this to a path inside your home directory.

I made a CMake include file to scan for libharu. But CMake has to find that include file first. If CMake complains that it cannot find "Findlibhpdf", you may need to adjust the path in the CMakeLists.txt file (in the "src" directory).

After successfully generating the makefile, do:

make

and the program builds.

Installation

The easiest way to install the program is to use

make install

Depending on which "install prefix" you set, you may need to use sudo on make.

The alternative is to copy the files by hand. In the location of your choice, you must first create an application directory, for example /home/you/librarian. Then, create a "bin" directory below the application directory and copy the program into the "bin" directory. The "template" directory should be below the application directory too, for example /home/you/librarian/template. The same goes for the "doc" and the "font" directories.

kicad-librarian's People

Contributors

compuphase avatar melak avatar thefork avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

kicad-librarian's Issues

screen layout fails when path to libraries becomes to long (see pictures)

Please scroll and see 3 screen shots
Screenshot: portrate_27inchMon shows the problem, notice the top right hand corner does not show the top right component selector. It’s not possible to see the right hand combo drop down window because this screen control is OFF SCREEN. It’s not possible to adjust or drag this screen control into view on a windows 10 computer. Using the mouse has no ability to do this; the mouse curser does not change to indicate that the window can be adjusted.
Now scroll down and take a look at the second screen shot of what I see on a landscape monitor...
portrate_27inchMon
Screenshot: landscape_27inchMon shows both top right and top left combo drop down windows. This is not possible to see on smaller monitors. Scroll down and see the third screen shot that shows the laptop monitor screen, its luck that I have a 27 inch monitor in landscape; the program would not be usable otherwise.
landscape_27inchMon
The following screen shot from the laptop also shows that the right hand combo drop down window is off screen and not accessible.
landscape_Laptop14inchMon
This problem did not initially manifest itself; it was not until I added another library where the file name path was long that the problem occurred. I noticed the screen repaint itself after I selected the OK button on the main menu - Preferences - Search paths screen.

Linux compilation

Hello,

I'm having some issues compiling in Linux. I'm using Debian Stretch and I get the error bellow when I try to compile. In cmake-gui I unchecked USE_CX3D since that library also has compilation errors.
I also tried to run KiCad-Librarian with wine and that somewhat works, although some menus and selection boxes are misplaced or squashed and the 3D viewer does not work.

Any help is appreciated

/home/tavi/src/KiCad-Librarian/src/pdfreport.cpp:804:51: error: no matching function for call to ‘wxSortedArrayString::wxSortedArrayString(int (&)(const wxString&, const wxString&))’
wxSortedArrayString SortedIndex(CompareFootprint);
^
In file included from /usr/include/wx-3.0/wx/filefn.h:15:0,
from /usr/include/wx-3.0/wx/utils.h:20,
from /usr/include/wx-3.0/wx/cursor.h:69,
from /usr/include/wx-3.0/wx/event.h:21,
from /usr/include/wx-3.0/wx/window.h:18,
from /usr/include/wx-3.0/wx/nonownedwnd.h:14,
from /usr/include/wx-3.0/wx/toplevel.h:20,
from /usr/include/wx-3.0/wx/frame.h:18,
from /home/tavi/src/KiCad-Librarian/src/pdfreport.h:25,
from /home/tavi/src/KiCad-Librarian/src/pdfreport.cpp:26:

Multi-delete/copy/move

It should be possible to select multiple symbols or footprints and click delete. The same could be implemented for copy and move.

'clean library command'

A command to remove any duplicate or incomplete symbols or footprints that may cause errors in Kicad.

Can't compile on Debian Testing:

khazakar@dellprecision5510:~/KiCad-Librarian$ LANG=C make -j8 [ 11%] Building CXX object CMakeFiles/kicadlibrarian.dir/pdfreport.cpp.o [ 11%] Building CXX object CMakeFiles/kicadlibrarian.dir/libmngr_frame.cpp.o /home/khazakar/KiCad-Librarian/src/pdfreport.cpp: In member function 'bool PdfReport::FootprintReport(wxWindow*, const wxString&, const wxArrayString&, const wxString&)': /home/khazakar/KiCad-Librarian/src/pdfreport.cpp:807:55: error: no matching function for call to 'wxSortedArrayString::wxSortedArrayString(int (&)(const wxString&, const wxString&))' wxSortedArrayString SortedIndex(CompareFootprint); ^ In file included from /usr/include/wx-3.0/wx/filefn.h:15, from /usr/include/wx-3.0/wx/utils.h:20, from /usr/include/wx-3.0/wx/cursor.h:69, from /usr/include/wx-3.0/wx/event.h:21, from /usr/include/wx-3.0/wx/window.h:18, from /usr/include/wx-3.0/wx/nonownedwnd.h:14, from /usr/include/wx-3.0/wx/toplevel.h:20, from /usr/include/wx-3.0/wx/frame.h:18, from /home/khazakar/KiCad-Librarian/src/pdfreport.h:25, from /home/khazakar/KiCad-Librarian/src/pdfreport.cpp:26: /usr/include/wx-3.0/wx/arrstr.h:385:3: note: candidate: 'wxSortedArrayString::wxSortedArrayString(const wxArrayString&)' wxSortedArrayString(const wxArrayString& array) : wxArrayString(true) ^~~~~~~~~~~~~~~~~~~ /usr/include/wx-3.0/wx/arrstr.h:385:3: note: no known conversion for argument 1 from 'int(const wxString&, const wxString&)' to 'const wxArrayString&' /usr/include/wx-3.0/wx/arrstr.h:383:3: note: candidate: 'wxSortedArrayString::wxSortedArrayString()' wxSortedArrayString() : wxArrayString(true) ^~~~~~~~~~~~~~~~~~~ /usr/include/wx-3.0/wx/arrstr.h:383:3: note: candidate expects 0 arguments, 1 provided /usr/include/wx-3.0/wx/arrstr.h:380:24: note: candidate: 'wxSortedArrayString::wxSortedArrayString(const wxSortedArrayString&)' class WXDLLIMPEXP_BASE wxSortedArrayString : public wxArrayString ^~~~~~~~~~~~~~~~~~~ /usr/include/wx-3.0/wx/arrstr.h:380:24: note: no known conversion for argument 1 from 'int(const wxString&, const wxString&)' to 'const wxSortedArrayString&' /usr/include/wx-3.0/wx/arrstr.h:380:24: note: candidate: 'wxSortedArrayString::wxSortedArrayString(wxSortedArrayString&&)' /usr/include/wx-3.0/wx/arrstr.h:380:24: note: no known conversion for argument 1 from 'int(const wxString&, const wxString&)' to 'wxSortedArrayString&&' make[2]: *** [CMakeFiles/kicadlibrarian.dir/build.make:206: CMakeFiles/kicadlibrarian.dir/pdfreport.cpp.o] Error 1 make[2]: *** Waiting for unfinished jobs.... /home/khazakar/KiCad-Librarian/src/libmngr_frame.cpp:4206:68: error: expected ';' at end of member declaration virtual wxDirTraverseResult OnFile(const wxString& /*filename*/) wxOVERRIDE { ^ ; /home/khazakar/KiCad-Librarian/src/libmngr_frame.cpp:4206:70: error: 'wxOVERRIDE' does not name a type; did you mean 'wxEVT_IDLE'? virtual wxDirTraverseResult OnFile(const wxString& /*filename*/) wxOVERRIDE { ^~~~~~~~~~ wxEVT_IDLE /home/khazakar/KiCad-Librarian/src/libmngr_frame.cpp:4209:62: error: expected ';' at end of member declaration virtual wxDirTraverseResult OnDir(const wxString& dirname) wxOVERRIDE { ^ ; /home/khazakar/KiCad-Librarian/src/libmngr_frame.cpp:4209:64: error: 'wxOVERRIDE' does not name a type; did you mean 'wxEVT_IDLE'? virtual wxDirTraverseResult OnDir(const wxString& dirname) wxOVERRIDE { ^~~~~~~~~~ wxEVT_IDLE make[2]: *** [CMakeFiles/kicadlibrarian.dir/build.make:141: CMakeFiles/kicadlibrarian.dir/libmngr_frame.cpp.o] Error 1 make[1]: *** [CMakeFiles/Makefile2:73: CMakeFiles/kicadlibrarian.dir/all] Error 2 make: *** [Makefile:152: all] Error 2

Compiling error

Using wxmac-3.0.2 and wxpython-3.0.2, I get this compiling error.
Should I be using a different version of wxwidgets?

[ 61%] Building CXX object CMakeFiles/kicadlibrarian.dir/libraryfunctions.cpp.o
/Users/x/dotcad/kicad/tools/KiCad-Librarian/src/libraryfunctions.cpp:1651:33: warning:
comparison of unsigned expression < 0 is always false [-Wtautological-compare]
if (footprint_attr_line < 0 && type != VER_INVALID) {
~~~~~~~~~~~~~~~~~~~ ^ ~
1 warning generated.
[ 66%] Building CXX object CMakeFiles/kicadlibrarian.dir/pdfreport.cpp.o
/Users/x/dotcad/kicad/tools/KiCad-Librarian/src/pdfreport.cpp:804:23: error: no matching
constructor for initialization of 'wxSortedArrayString'
wxSortedArrayString SortedIndex(CompareFootprint);
^ ~~~~~~~~~~~~~~~~
/Users/x/.m3/envs/kicad/include/wx-3.0/wx/arrstr.h:377:24: note: candidate constructor
(the implicit copy constructor) not viable: no known conversion from 'int (const wxString &,
const wxString &)' to 'const wxSortedArrayString' for 1st argument
class WXDLLIMPEXP_BASE wxSortedArrayString : public wxArrayString
^
/Users/x/.m3/envs/kicad/include/wx-3.0/wx/arrstr.h:382:3: note: candidate constructor not
viable: no known conversion from 'int (const wxString &, const wxString &)' to
'const wxArrayString' for 1st argument
wxSortedArrayString(const wxArrayString& array) : wxArrayString(true)
^
/Users/x/.m3/envs/kicad/include/wx-3.0/wx/arrstr.h:380:3: note: candidate constructor not
viable: requires 0 arguments, but 1 was provided
wxSortedArrayString() : wxArrayString(true)
^
1 error generated.
make[2]: *** [CMakeFiles/kicadlibrarian.dir/pdfreport.cpp.o] Error 1
make[1]: *** [CMakeFiles/kicadlibrarian.dir/all] Error 2
make: *** [all] Error 2

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.