The BIM Collaboration Format (BCF) is an open file format used for storing data (comments, screenshots, etc.) about IFC models. The official documentation for BCF can be found here.
This document describes how to load a BCF file and interact with the data in the HOOPS Web Viewer.
The BCFManager class facilitates loading, accessing, and editing data from a BCF file.
The BCFData class represents a single BCF file. It contains a set of BCFTopics, as well as information about the BCF filename and version.
Each BCF file can contain multiple topics. Each topic contains a BCFMarkup, set of BCFSnapshots, and set of BCFViewpoints. Each BCFViewpoint can have exactly one corresponding snapshot. Each topic has a unique id and contains images, camera viewpoints, markup, and comments. The BCFTopic class provides access to this data via the BCFMarkup, BCFViewpoint, and BCFSnapshot classes.
The BCFMarkup class contains textual information about the topic. This includes the title, author, description, comments, etc. For a list of all markup data to query, see the webviewer API Reference.
The BCFSnapshot class contains image data related to the topic.
The BCFViewpoint class contains information about components related to the topic, camera settings, and possible markup and clipping information. This class can be used to activate a view, which will change the camera, visibility, cutting planes, colors, and markup.
To load a file via HTTP request:
After a BCF is loaded, the bcfLoaded callback is triggered. This callback contains an id that corresponds to the BCFData object representing the BCF file and can be used to retrieve it.
Interacting with BCF data
It is also possible to create BCF data using the BCFManager createBCFData function.
Using the id that is returned in the bcfLoaded callback, you can get the BCFData object.
The getTopics function will return a map containing the BCFTopic ids and BCFTopic objects.
Each topic can have only one markup and can contain multiple snapshots and viewpoints.
To add a topic to our BCFData, first we create the topic, and then add it using the addTopic function.
To delete a topic, remove it from the BCFData topics map.
Topic comments are part of the markup class. Below we create and add a comment, update it, then delete it.
To correlate a snapshot and viewpoint, we first create them and then add them to the topic snapshot and viewpoint maps, as well as add it to the markup class. The viewpoint and snapshot name prefixes do not have to match but are associated by the markup class.
To export a BCF and download a zip file, use the exportBCF function.