ifc

IFC file that works on IFCJS/web-ifc-viewer and not on IFCJS/web-ifc-three


Some specific IFC files load correctly on web-ifc-viewer, but didn't load on web-ifc-three.

When the file doesn't load, the browser tab freezes. The performance monitor shows 100% of the CPU is used. After some time, the tab stops responding, and it takes about 10 sec to close it.

Here is the IFC file

It's work on viewer-demo but didn't work on helloworld

In the console, I can see :
"web-ifc: 0.0.34 threading: 0"
"No basis found for brep!"
"unexpected style type"

Any suggestions will be thankful.


Solution

  • IFC.js has 2 different boolean engines right now: FAST and SLOW. Boolean operations are one of the most complex features in geometry generation in IFC, and sometimes the SLOW procedure is unable to compute the geometry of certain meshes. This will get solved eventually with both procedures.

    You can use the fast boolean procedure (which is somewhat less precise in certain meshes but should never crash) changing the configuration of IFC.js like this:

    ifcLoader.IfcManager.applyWebIfcConfig ({ USE_FAST_BOOLS: true });
    

    This is unrelated to the messages you see in the console. They are warnings (not errors) of elements that have not been yet implemented in web-ifc. They will also disappear as the library progresses, but you should still be able to see the models and work with them.