librepcb-doc icon indicating copy to clipboard operation
librepcb-doc copied to clipboard

Conventions: Library organization

Open hephaisto opened this issue 7 years ago • 5 comments

I would suggest one base repository which only includes abstract objects like "OpAmp Gate Symbol" and standard packages, and no actual devices. Most custom objects should reference these instead of creating their own.

hephaisto avatar Apr 04 '18 20:04 hephaisto

Or maybe more generally, how do we want to split up libraries?

KiCad has this convention:

Rather than grouping components (e.g. symbols, footprints) by their manufacturer, KiCad libraries are organized by component functionality. This grouping strategy has a number of key benefits:

  • Similar components are grouped together, allowing alternative parts to be easily substituted

  • Symbol aliases for pin-identical symbols can be used to reduce library size

  • Generic parts which are produced by multiple manufacturers are supported

dbrgn avatar Apr 05 '18 06:04 dbrgn

My suggestion:

  • LibrePCB Base
    • All component categories
    • All package categories
    • All standard packages
    • Commonly used symbols (resistor, capacitor, ...)
    • Commonly used generic components (resistor, capacitor, ...)
    • Commonly used generic devices (R-0603, C-0805, ...)
  • LibrePCB Connectors
    • Symbols of generic connectors (pin headers, D-Sub, USB, ...)
    • Packages of generic connectors (pin headers, ...)
    • Components of generic connectors (pin headers, D-Sub, USB, ...)
    • Devices of generic connectors (pin headers, ...)
  • LibrePCB Integrated Circuits
    • Symbols of generic ICs (OpAmp, 555, ...)
    • Components of generic ICs (OpAmp, 555, ...)
    • Devices of generic ICs (OpAmps, 555, ...)

So far, generally without specific parts of specific manufacturers. Then for each manufacturer I would create one or more libraries per manufacturer, for example:

  • Texas Instruments
    • Symbols, Packages, Components and Devices of TI-specific parts
  • STMicroelectronics
    • Symbols, Packages, Components and Devices of ST-specific parts

and so on.

Of course sometimes it's hard to decide in which library something should be placed. For example a 555 IC is quite generic, but available from different manufacturers. Such things I would probably put into the "LibrePCB Integrated Circuits" library as it's not strongly related to a specific manufacturer.

KiCad has this convention:

Yeah but KiCad has the problem that the library browser directly shows the structure of the libraries, so it's very important to have a meaningful library structure. But in LibrePCB we have categories, so the library browser does not depend on how the libraries are organized. So we can focus on other aspects of library organization.

ubruhin avatar Apr 05 '18 10:04 ubruhin

Sounds good to me!

dbrgn avatar Apr 05 '18 10:04 dbrgn

Should we document this in the https://docs.librepcb.org/#libraryconventions? I guess this is the reason this issue is still open?

rnestler avatar Jun 26 '19 11:06 rnestler

@rnestler Yes, would be nice to have this documented :+1:

ubruhin avatar Jun 26 '19 17:06 ubruhin