vxmdesign / stp2gltf

Tool for converting step files to gltf files
21 stars 6 forks source link

Conflict with Kicad 7 on Ubuntu 22.10 #1

Open leoheck opened 1 year ago

leoheck commented 1 year ago

I was able to compile this repo, and it was working fine for me. Then I had to install Kicad 7, and then this stp2gltf started to fail during the build and the execution of the bin built before.

When I build it, I see this error

stp2gltf on  master [!] …
➜ make
g++ -g -I/usr/include/oce -I./microjson -L./microjson -c main.cpp
In file included from Accessor.h:6,
                 from main.cpp:6:
LoadFace.h:4:10: fatal error: TopoDS.hxx: No such file or directory
    4 | #include <TopoDS.hxx>
      |          ^~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:74: main.o] Error 1

The issue is the conflict of liboce-ocaf-dev with Kicad 7 stuff

➜ sudo apt install liboce-ocaf-dev
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

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.

So, I am wondering if you have an idea of a workaround for me to have the stl2gltf working on my system. I would like to use the stl2gltf exactly to be able to open 3d files from Kicad (step) in the browser.

chrisl8 commented 11 months ago

@leoheck I found your fork, which solved the problem you note, but I am getting this error when I try to build it with make:

LoadFace.cpp: In constructor ‘LoadFace::LoadFace(TopoDS_Face&)’:
LoadFace.cpp:18:9: error: ‘Poly_ArrayOfNodes’ does not name a type
   18 |   const Poly_ArrayOfNodes& arrPolyNodes = triangulation->InternalNodes();
      |         ^~~~~~~~~~~~~~~~~
LoadFace.cpp:22:24: error: ‘arrPolyNodes’ was not declared in this scope
   22 |     transformedPoint = arrPolyNodes[i].Transformed(transform);
      |                        ^~~~~~~~~~~~
make: *** [Makefile:66: LoadFace.o] Error 1

Any idea what is going on here? Thanks for any help.

leoheck commented 11 months ago

Hi, @chrisl8 forgot to reply to you. Yeah, this is hard to fix. I remember I could compile but I am not sure how to help you specifically.

Just tried it now, using my fork... but on my current system Ubuntu 23.10

image

I also had to install 2 extra packages to make it compilable, here.

libocct-ocaf-dev
libocct-data-exchange-dev

These are the things I have installed, it may help you. image

I pushed these new additions. You can try to install dependencies with

make install_dependencies

After that, if the compilation works you can test it with make test