The Viewer
This is a an illustation of the use of the CRUD REST APIs to access the data and in this specific case, get the IFC file of a SpatialZone and display it with the ThatOpen IFC Viewer.
D4SU is a backend server and this features is only for illustration purpose and based on a basic mustache template with an iframe for the That Open viewer.
The service is available at
/pages/thatopen-viewer
The page has a basic layout.
It lets:
(1) Enter the id of a bundle (e.g. 158) and activate the Get SpatialZones
button
(2) This triggers the call of /common/bundle/158/bundle-unit-list/?unit_type=IfcProject,IfcSpatialZone
which comes with the list of the SpatialZones for the bundle and with the initial IFC file associated with the IfcProject. The name of the Project in the IFC is '0001' and we have not changed it.
(3) The user can select the apartment Duplex-A
and activate the Get IFC
button.
(4) This triggers the call of common/bundle/158/unit/53d4ba7a-5f23-412a-96db-0735b79bcfe8
which comes back with the detail of the IfcSpatialZone for the apartment Duplex-A, with the path of the IFC file in the unitjson
field. This is passed to the viewer so that the viewer can get and and display the IFC file
(5) Then, the user can select an object (here a wall) and get the details of the object in the right panel.
(6) The viewer can select the second duplex
(7) The user can also select the project (named '0001') and display the original IFC file
The IFC file displayed is the source file which is an IFC2X3 file and the viewer use its own color palette and also shows the spaces.
(8) If instead, we extract the IfcJSON from the database and convert it to an IFC4, the colors will be those defined in the (original) IFC files.