Help - liboce-ocaf-dev conflicting with Kicad

I am on Ubuntu 23.04 and I have to install the package liboce-ocaf-dev but Kicad conflicts with it as it is shown above.

➜ sudo apt search liboce-ocaf-dev
[sudo] password for lheck: 
Sorting... Done
Full Text Search... Done
liboce-ocaf-dev/lunar 0.18.3-2 amd64
  OpenCASCADE Community Edition CAE platform library development files
➜ sudo apt install liboce-ocaf-dev
(some text was removed from here...)
The following packages have unmet dependencies:
 kicad : Conflicts: liboce-foundation11 but 0.18.3-2 is to be installed
         Conflicts: liboce-modeling11 but 0.18.3-2 is to be installed
         Conflicts: liboce-ocaf11 but 0.18.3-2 is to be installed
         Conflicts: liboce-visualization11 but 0.18.3-2 is to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.

Could someone help me understand what is going on?
I have a tool that I want to build and use, that uses this liboce-ocaf-dev but Kicad does not allow me to install the package using the package manager.

This is the thing I want to build. GitHub - vxmdesign/stp2gltf: Tool for converting step files to gltf files
I appreciate it if anyone has a workaround that allows me to have the Kicad and the package I want to install.

Currently using this version of Kicad:

Application: KiCad x86_64 on x86_64

Version: 7.0.5-4d25ed1034~172~ubuntu23.04.1, release build

Libraries:
	wxWidgets 3.2.2
	FreeType 2.12.1
	HarfBuzz 6.0.0
	FontConfig 2.14.1
	libcurl/7.88.1 OpenSSL/3.0.8 zlib/1.2.13 brotli/1.0.9 zstd/1.5.4 libidn2/2.3.3 libpsl/0.21.2 (+libidn2/2.3.3) libssh/0.10.4/openssl/zlib nghttp2/1.52.0 librtmp/2.3

Platform: Ubuntu 23.04, 64 bit, Little endian, wxGTK, ubuntu-xorg, x11

Build Info:
	Date: May 27 2023 23:08:39
	wxWidgets: 3.2.2 (wchar_t,wx containers) GTK+ 3.24
	Boost: 1.74.0
	OCC: 7.6.3
	Curl: 7.88.1
	ngspice: 38
	Compiler: GCC 12.2.0 with C++ ABI 1017

Build settings:
	KICAD_SPICE=ON

Kicad depends on libocct but that conflicts with liboce because they are different versions of same lib. Historically community fork (liboce) was introduced because OpenCascade was not responsive to open source patches there were licensing issues. At some point liboce was ahead in features too but no longer. libocct has caught up and fixed other issues so it is recommended to use it now.

You can read up more on it here OpenCASCADE - FreeCAD Documentation

So your choices are:

  1. Try to compile that thing with occt instead, it might just work or require minor patching.
  2. Compile it in a docker container or other sandbox.
  3. Use flatpak kicad.

I like this one, and this is what I was trying. At the first moment, it looks like it has some header files that are missing.

Well, thanks, at least you helped me to understand that it might have a way to port this to use occt as I was tryring.

You probably need to install libocct-dev or something like that.

Hm interesting.
This was a good help.

I installed this one

libocct-foundation-dev

I had to change this -I/usr/include/oce
to this -I/usr/include/opencascade/

But this thing was hard to find since it was not using any reference to the occt string as I thought but to opencascad. But I finally found the headers I was looking for.

Now I could build some of the sources, got another issue, but you could unlock me the missing libs step. Thanks, that was Qu1ck!

Yay! awesome.

stp2gltf …
➜ make test -B
./stp2gltf dsub.stp dsub.gltf dsub.bin
Found 7 Colors
total colors 7
Total faces: 1617
C: 0.500000 0.500000 0.500000: 1617
C: 0.730461 0.356400 0.025187: 0
C: 0.456411 0.456411 0.456411: 0
C: 0.127438 0.127438 0.127438: 0
C: 1.000000 1.000000 1.000000: 0
C: 0.033105 0.033105 0.033105: 0
C: 0.119280 0.119280 0.890005: 0

Here are the changes I had to do to put this working with the libocct.

1 Like

Now I have to figure out how to fix or add the colors! :sweat_smile:

But at least I can compare 3D models now, side by side.

Here the female header was replaced by a male one

Using this I can export a step file and then convert it to .gltf/.bin

kicad-cli pcb export step --subst-models -f -o board.step board.kicad_pcb
./stp2gltf board.step board.gltf board.bin

The comparison is using this page, here:

2 Likes

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.