AppImage for 9.0 without 3d model visualization - which libraries?

Hi all,

I’m trying to fix appimage compilation for KiCad (Yes, I know there are other options, but forgive me :slight_smile: Anyway. I’ve successfully changed and make PR for GitHub - CyberCircuits/kicad-appimage in order to build 8.0.8 image. It works OK with 3D preview (pcb board AND model visible).

Now i’m trying to make changes to compile 9.0 as AppImage. Current work is here: GitHub - slawekmikula/kicad-appimage at ubuntu-24.04-fix. Compilation against next ubuntu jammy (22.04). Everything compiles OK and works (roughly tested) but I have problem with 3D visualization. Models are in place, but I have only board visible without 3d model.

May I ask some more experienced developers which libraries are responsible in KiCad for wrl/step rendering ? It might help a bit searching for solution. Thanks

The libOCCT libraries are used for reading 3d model files. Rendering is internal code.

Thanks @Seth_h, I’ll look into it. There is nothing in the stdout/stderr from the running process. I’ll try to dig it up.

Well, KiCad silently skips the 3D rendering if the file cannot be found or opened so I wouldn’t expect any error messages.

This doesn’t look quite right either

You can try running the step export. That will give more detailed OCCT messages about models. It might just be looking in the wrong location

Thanks for tips. I’m a very beginner with KiCad so sorry for my knowledge about the app. I’ve exported to STEP. Without substantial error and in freecad the part is shown :slight_smile:

Polecenie:
"[..cut.]/kicad-appimage/KiCad/KiCad.AppDir/usr/bin/kicad-cli" pcb export step --subst-models --drill-origin --min-distance='0.001mm' -f -o "[..cut.]/kicad/test-kicad-sample/test-kicad-sample.step" "[..cut.]/kicad/test-kicad-sample/_autosave-test-kicad-sample.kicad_pcb"

00:07:00: Error: schema file '[..cut.]/kicad/test-kicad-sample/share/kicad/schemas/api.v1.schema.json' not found
Determining PCB data
Build STEP data
Adding component REF**.
Create PCB solid model
Board outline: find 4 initial points
Build board outlines (1 outlines) with 4 points.
Build board cutouts and holes (6 hole(s)).
Build holes for shapes

Generate board full shape.
Writing STEP file
STEP file '[..cut.]/kicad/test-kicad-sample/test-kicad-sample.step' created.

Export time 0.298 s

*** Zakończono sukcesem ***

I believe these universal packages like appimage and flatpak include the symbol and footprint libraries but not the 3D libraries for reason of size. There is some path mapping going on to allow appimage to access the symbol and footprint libraries which are usually at a different path inside the appimage. You may have to look at how it accesses the 3D model paths. Do you have the 3D model files installed, independent of the appimage, say from Github, or a native installation? Have you looked at how it’s done in the v8 appimage?

Yes, 3d packages is included in this image. Also correctly it set KICAD9_3DMODEL_DIR path. I’ve also compiled on my own 8.0.8 appimage (on github is AFAIR 8.0.6) and there i can see models. I’ve also compared libraries from 8.0.8 and 9.0.0 but 8.0.8 is built based on 20.04 and 9.0 is for 22.04 (only this is available at PPA) so much of the libraries differs. I’ll digging it further as time permits :slight_smile:

I think the shown icon is placed because it can’t find “minus icon” as far as compare it with 8.0.8. There are simple fonts -/+. Button is working (change values accordingly). Of course something to fix with appimage.

Since you can export, that indicates that the libOCCT files are linked and working correctly. And also that KiCad is able to find 3d model files.

What remains is the model display. KiCad caches models and this might be an issue for the AppImage if the cache location cannot be utilized.