wiki:PartsLibrary

Version 3 (modified by leo, 2 years ago) (diff)

--

Parts Library

LeoCAD is completely compatible with LDraw's Parts Library. In fact, the library included in the installer packages is just a zip archive of LDraw's library without any changes.

This is done mostly to simplify things for new users so they don't need to download and install a separate file or worry about updating their library. A lot of LeoCAD's users are young people without a lot of computer experience so the setup process is kept as simple as possible.

At the same time there are experienced users who like to maintain their own libraries with unofficial parts that they create or download from the internet. Those people can share their LDraw library with LeoCAD and use it directly, all they need to do is point LeoCAD to it.

Using a Custom Parts Library

There are several ways to specify a custom library folder or file (in order of priority):

  • Use the -l command line option followed by the library path
  • Set the LEOCAD_LIB environment variable
  • Enter a new library path in the Preferences Dialog

Note that LeoCAD can use either a zip file or a regular folder for its library.

Default Library Path

The default library path is different for each OS:

  • Windows: The program looks for library.bin in the same folder where LeoCAD.exe is located
  • Linux: This is set at compile time but it's usually /usr/share/leocad/library.bin or /usr/local/share/leocad/library.bin
  • Mac OSX: The library.bin file in the Contents/Resources folder inside the application bundle

On Linux you can set the install path prefix at compile time by passing it to qmake:

$ qmake INSTALL_PREFIX=/my/path

This will change the default library path to /my/path/leocad/library.bin