Piece registrations were centralized but creation, reference bookkeeping and cleanup still lived in the library. Move creation/model reuse, normalization, metadata renaming, reference operations, temporary cleanup, project transfer and ordered identity teardown into the manager. Keep registration/deletion helpers private and remove the temporary local-registry enumeration APIs. The library remains the acquisition facade and coordinates source resolution, loading, invalidation and cancellation after unlocking. Handles still bind to the library. Clear sparse errors from lcPieceData::Unload before resource teardown so manager deletion does not require a library pointer or callback. Sparse error storage and the existing synchronization remain library-side. Use one project-aware manager lookup, passing nullptr for shared-only searches. Remove the maximum-size name reservation so short names can use inline storage. Replace remaining bounded C-string copy/terminator pairs with lcstrcpy and record the helper convention in common/AGENTS.md. Update the asset lifetime documentation. Validation: macOS Qt 6.10 Debug build, whitespace checks and 40 offscreen lifecycle checks, including already-zero release, last-owner cancellation, model reuse, project detach/transfer cleanup, sparse errors, archive/directory caches and forced nested external-project teardown. Successful GPU rendering is not covered by the offscreen checks.
About LeoCAD
LeoCAD is a CAD program for creating virtual LEGO(R) models. It's available for free under the GNU Public License v2 and works on the Windows, Linux and macOS Operating Systems.
Installation
You can download the latest version of LeoCAD and its Parts Library from the main website at https://www.leocad.org
It's recommended that you install the latest drivers for your video card since LeoCAD uses OpenGL to take advantage of hardware acceleration for rendering.
LeoCAD for Windows
Download the latest LeoCAD-Windows.exe to your computer, double click on the icon to launch the installer and follow the instructions.
LeoCAD for macOS
Download the latest LeoCAD-macOS.dmg to your computer, double click on the icon to open the archive, copy LeoCAD.app to your Applications folder and then launch it from there.
LeoCAD for Linux
There are multiple ways to install LeoCAD on Linux.
-
Snap Store
You can find LeoCAD in your distribution's Snap Store. Alternatively, you can enter
sudo snap install leocadto install it using the command line. -
AppImage
Download the latest LeoCAD-Linux.AppImage, make the file executable (
chmod +x) and run it. -
Flatpak
You can also install LeoCAD releases as a Flatpak from Flathub: https://flathub.org/apps/details/org.leocad.LeoCAD
Note: there might be a delay for new releases to appear there. If you have it already installed, it will be updated.
-
From source
If you prefer to compile LeoCAD yourself, go to the GitHub releases page at https://github.com/leozide/leocad/releases/latest and download the source archive from there. If you do not already have a Parts Library installed, you will need to download one and follow the installation instructions. More information on how to compile your own executable is available in the Documentation section of https://www.leocad.org
Online Resources
New users should read the online tutorial located at https://www.leocad.org/docs/tutorial1.html to learn how to use LeoCAD.
-
Website: https://www.leocad.org
-
GitHub page: https://github.com/leozide/leocad
-
Unstable builds: https://github.com/leozide/leocad/releases/tag/continuous
Legal Disclaimer
LEGO(R) is a trademark of the LEGO Group of companies which does not sponsor, authorize or endorse this software.