IFC clipping planes makes the viewer to crash!

Hello folks,
I have an ifc model with 43 material on it:

When I place a clipping plane, the viewer decrease in performance. It takes 30 seconds to orbit the camera in some direction then another 30 seconds to rotate camera again

Is there any setup I should activate in order to clip tons of materials?

Best regards,
Miguel G

Can you please share more information how you define clipping planes in your application? Are you defining them on material or renderer level?

My bad, I’m using the IFC.js library to create IFCclipping planes:

const clipperIfc = ifcviewer.clipper;
      clipperIfc.active = true;
        const upsidePlaneIFC = clipperIfc.createFromNormalAndCoplanarPoint(
          new Vector3(0, -1, 0),
          new Vector3(
            (box.min.x + box.max.x) / 2,
            (box.min.z + box.max.z) / 2
        //1.b) ifcplaneMesh:turn off material
        const mesh = upsidePlaneIFC.planeMesh;
        mesh.material.opacity = 0.0;

and here you can find the source code:

which use an IfcPlane class:

which have a “plane” from Three js as props

Since you are using an IFC component for clipping, you might want to report this performance issue directly at the respective web-ifc repository.

Indeed, I tried the rough three js library, and works well in my Architecture models (+100 materials). Apparently, the issue comes from the IFC clipping commands. Going to report that

Thanks Mugen!