How to implement Clash Detection for IFC files in the HOOPS Web Platform

Here is a quick overview on how to implement clash detection between one or multiple IFC files in HOOPS Communicator by leveraging HOOPS Exchange on the server.
To start, let’s assume you have one or multiple stream cache models (derived from IFC) loaded in the HOOPS Communicator Webviewer potentially with elements moved by user interactions (handles, etc.), and some groups/elements selected to test clash against each other. From there, you would follow this workflow:

  1. Aggregate the IFCs in HOOPS Exchange by loading them one by one, and adding them with the appropriate transformation, to an empty ModelFile. You can speed up in this step if you have saved your models as PRC already as those can be loaded into HOOPS Exchange without a conversion step.
  2. Set up the groups for clash detection in HOOPS Exchange (relying on the unique IFC GUID’s from the webviewer) and iterate over the model to find the Breps and their corresponding transformation.
  3. Perform clash detection using HOOPS Exchange functions. (HOOPS Exchange documentation — HOOPS Exchange 2023 documentation)
  4. Send the results (GUID’s of elements that are clashing) back to the webviewer.
  5. Display the results in the webviewer (you probably want to create a nodeid/IFCGUID map to speed up this process)

Hope this helps. If you have any questions feel free to post them below. :blush: