I hope someone of you can help me out with my problem.
I need to load and display the data from IFC-Files in my Threejs application. I found the git repo GitHub - ThatOpen/web-ifc-three: The official IFC Loader for Three.js., but that seems to be deprecated and replaced by GitHub - ThatOpen/engine_components. As far as I understand, I would have to rewrite most of my application so that it would work with the solution from GitHub - ThatOpen/engine_components, just so I can load ifc-files to my threejs scene. I tried to install the npm package npm i @thatopen/components in my angular 17 application, but I got dependency errors, because of a version mismatch with threejs in my app and the version used in thatopen/components.
My application is rather big and complex and it seems a bit extreme, to rewrite most of my app.
Do I missunderstand something or is there a simpler way to load ifc-data to my threejs scene?
the “drop dead simple” way would be to have a pipeline where you convert your IFC to GLB, then render that in ThreeJS
For that specific library @thatopen/components, i think it should be possible to integrate it without having to rewrite your whole app? what version of threejs are you using? their example is using 0.160.1:
it seems like it should work with whatever threejs version you have, but there may be specific conflicts in specific versions…?
it does also seem like, instead of creating your own threeJS scene, and adding this library pieces into it, the library expects you to initialize a scene through their function, and add your models/everything else to the scene they create
I actually told my PM that converting the IFC to GLB would be the easiest and fastest solution, BUT he wants the native IFC-Data imported to the scene. I will talk to him again…
I use the latest threejs version (0.165.1).
it does also seem like, instead of creating your own threeJS scene, and adding this library pieces into it, the library expects you to initialize a scene through their function, and add your models/everything else to the scene they create
Yeah thats the point. Our app got really huge over time and it would be a major rewrite, just to adjust our functions to the library.
yeah I’m curious what tradeoffs he’s considering here! is the worry about like, losing the original IFC files, or losing some metadata stored in IFC that isn’t kept it in the glb? (there may be workarounds for each of these if you can identify what the specific worries are)