engine_web-ifc: Possible Bug - IFC model not loading correctly.
Describe the bug 📝
Hey,
After loading this particular model (ifc file), I see that not all the items are loaded correctly. Some elements may be missing. I am testing directly with the latest version of the official template.
In the following screenshot you can see the original model loaded correctly using usBIM.
And this is the result of having loaded it using the official template:
As you can see, most of the roof has not been loaded. Some parts are loaded but the geometry is not correct.
I am aware that you need the IFC file to replicate the problem. But in this case, the IFC I am using is a corporate one, which I cannot publish. Is there a way to send you the IFC without it being public?
Thank you very much.
Reproduction ▶️
No response
Steps to reproduce 🔢
No response
System Info 💻
System:
OS: Windows 11 10.0.22631
CPU: (20) x64 13th Gen Intel(R) Core(TM) i7-13700H
Memory: 2.64 GB / 15.64 GB
Binaries:
Node: 20.11.1 - C:\Program Files\nodejs\node.EXE
npm: 10.2.4 - C:\Program Files\nodejs\npm.CMD
Browsers:
Edge: Chromium (126.0.2592.113)
Internet Explorer: 11.0.22621.3527
Used Package Manager 📦
npm
Error Trace/Logs 📃
No response
Validations ✅
- Read the docs.
- Check that there isn’t already an issue that reports the same bug to avoid creating a duplicate.
- Make sure this is a repository issue and not a framework-specific issue. For example, if it’s a THREE.js related bug, it should likely be reported to mrdoob/threejs instead.
- Check that this is a concrete bug. For Q&A join our Community.
- The provided reproduction is a minimal reproducible example of the bug.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 1
- Comments: 30 (10 by maintainers)
Commits related to this issue
- Update eps.h (issues #969 and #967) While it solves some issues, it causes new issues in #452. Just a stopgap — committed to ThatOpen/engine_web-ifc by QuimMoya 2 years ago
Salut
I also stumbled across the artifacts and it seems the issues started with the update on the ray-triangle intersection https://github.com/QuimMoya/fuzzy-bools/commit/2cf2885065dcf5359dc42b9934cd7d0acb62f431. Here is a before and after comparison:
@QuimMoya what were the goals of this update? Could the use of
GLM's glm::intersectRayTriangleimplementation be an alternative?@agviegas who is in charge of the geometry engine?
It would be cool if we could solve this
Cheers
Hey @QuimMoya
Thanks for the update. Will there be a new version with these changes that I can try with my IFC model? Have you tried with my IFC file and see if the problem has been solved?
Thank you very much.
The last release should include many fixes. You can test with it
Just changed that
I think these question are more on the side of thatopen. I’m more focused on geometry 😃
Anyway, if you agree I will close this issue.
I have identified the root cause of the last issue. The whole process works fine, but it fails to correctly identify which triangles to retain and which to discard.
Hi @QuimMoya
I did not use an IFC model but instead generated 3D data manually and stored it in text files:
These are simple text files with the vertex data on the first and the triangle face indices on the second line.
Here is the C++ wrapper program for the subtracting the geometries (as a
.txtfile to make GitHub happy): main.cpp.txt. I compiled against the version in your repo https://github.com/QuimMoya/fuzzy-bools and swapped some files.The geometries are rotated slightly by some degrees to trigger floating-point errors. Also found that changing
toleranceVectorEqualitycan bring back some of the missing faces.I can also share some Python code for the geometry generation and plotting if you would like to?
Best
@atheler right now it’s @QuimMoya. Right now he’s out in vacations, but feel free to shoot him a message for when he’s back!
@maidi29 right now we don’t know. The person in charge of the geometry engine is out on vacations until the end of August. In addition, geometry problems are uncertain: some take hours, other takes weeks.
If you are in a hurry and just want to use a previous version of web-ifc, my suggestion in the meantime is that you fork the components repo, install the version of web-ifc you need and solve the errors that come up (there shouldn’t be many). Happy to guide you in the process if you decide to go down this route!
Hi @agviegas, do you have a rough estimation on how long it will take to fix the issue with the missing faces? As already said, we see the issue in almost all of our models, and sometimes many faces are affected. I also tested one of the models with lots of issues in your link but no improvement:
How it should look like and also did with an old version:

Rollback to version 1 of the engine_components is not really an option for us since we started the project with version 2
Hello @agviegas,
To give you more context on this problem, I confirm that using the “web-ifc” version: “0.0.51” this same IFC was loaded correctly. Because previously I was working with the openbim-components@1.4.14 version which internally uses the 0.0.51 version of the web-ifc. The origin of the observed problem has been the migration of the components from 1.4.14 to 2.1.13.
Therefore, keeping this in mind, and from what I see the solution to the problem may take a considerable time, I am thinking of using version 0.0.51 in the latest versions of @thatopen/components. Is this possible?
I have tried to do the following:
But I get the error:
Missing field: “OPTIMIZE_PROFILES”.
Can you give me any suggestions to bypass this problem temporarily?
Or is it not possible to use this old version of webfic with the new components? Thank you very much.