In this chapter, we will discuss some of the features in HOOPS Communicator specific to the Building & Construction industry.
A list of all supported formats of HOOPS Communicator can viewed in the File Formats Reference Page.
The file formats specifically relevant to BIM are:
- DWG 2D/3D & DXF
After an IFC file has been converted to the Stream Cache format it can be viewed and interrogated in the HOOPS Web Viewer. The Model Tree in the case of an IFC model is derived from its structural building hierarchy (IFCBUILDING->IFCFLOOR->IFCSPACE…) with additional properties and attributes stored on the nodes of the model. The GlobalIDs of an IFC file are also stored among those attributes. More information on how to parse attributes in a model can be found here.
You can also export IFC data file to an XML file with the --output_xml_assemblytree command line option which you can then use to parse that attribute data outside of the viewer.
When loading a Stream Cache model converted from an IFC file into the HOOPS Web Viewer you can get a list of all IFC Types that exist in the model with the getGenericTypes() function.
Given the types above you can then get a list of nodes for a specific IFC type with the getNodesByGenericType() function.
To query the IFC Type of an individual node you can use the getNodeGenericType() function below:
HOOPS Communicator will convert all IFCPRESENTATIONLAYERASSIGNMENT elements in IFC models to layers that can be queried in the HOOPS Web Viewer. To find out more about layers please refer to this programming guide entry.
When an IFC model is converted to a Stream Cache the IFC GlobalId attribute of an entity is not only available by querying the properties of the node but can also be accessed directly via the getNodeGenericId() function
IFC Walk Operator
When loading a Stream Cache Model converted from an IFC file the Keyboard-Based Walk Operator uses a set of predefined IFC types to determine walls and floors in a model. Based on that information it can perform collision detection as the user navigates through the model, automatically adjusting the height of the camera to the floor and blocking movement through walls.
To activate the keyboard-based walk operator and enable collision detection please see the code below:
Please note that activating collision detection can affect performance with larger models.
See below for the default keys when using Keyboard Based Walk:
Revit support has been officially introduced with HC2019 and has seen constant improvements. Currently, it offers support for:
- Node Attributes
- 3D Views
- Textures & Colors
- Linked Views
Support for 2D Views (Elevation Views, etc) and other enhancements are planned for a future release.
HOOPS Communicator supports 2D and 3D content within a DWG file with the ability to display each sheet in a DWG file as well as the 3D geometry
When importing DWG files you can specify if you are only interested in the 2D (drawing) content, the 3D data within a DWG file or both with the --drawings_mode converter command line option. If you choose both then the sheet tab in the model browser will contain all sheets as well as the 3D model.
When a DWG file has been imported with drawings enabled then each sheet will be visible in the Sheet tab in the model browser. By clicking on a sheet in the model browser the HOOPS Web Viewer will switch to the new sheet.
To find all sheets in a model when writing your UI programmatically you can use the getSheetIds() function which returns a list of NodeIds for each sheet representing the top-level node for each sheet.
You can also get the NodeId of the currently active sheet with the getActiveSheetId() function.
To switch to a new sheet you can use the setActiveSheetId() function.
When a 2D sheet is activated the HOOPS Web Viewer will automatically switch to "drawing mode", ensuring that camera manipulation is constrained, and a drawing background is added to the model.
By default, the HOOPS Web Viewer will display a drawing sheet on a white background with a dark grey shadow effect on top of a grey window background. You can change the color of both backgrounds and the shadow with the setSheetColors() function.
You can also choose to turn off the sheet background altogether with the setBackgroundSheetEnabled() function.
Federated Models in BIM
A common concept in BIM is to break up large building projects into multiple disciplines (Architectural, Plumbing, Mechanical, etc.) each worked on by different teams and often represented by their model files. To support this workflow HOOPS Communicator allows you to easily aggregate models in the HOOPS Web Viewer using the loadSubtree functionality.
For more information about model aggregation please see the Loading Subtrees Programming Guide.