Skip to content

IFCTerrain Developer Documentation

Marcus Schroeder edited this page Sep 28, 2021 · 7 revisions

The developer documentation provides important information from the developer's point of view.

In the following the general structure is explained. If you are already familiar with it you can also read about the following topics: Code Structure & Databinding.


General structure

For the basic structure, the following figure is intended:

Overview - IFCTerrain

The program flow can be described by nine essential steps.

Step (1) - Program usage

First of all, a distinction is made in the usage. Here, a decision is made between IFCTerrain GUI and IFCTerrain Command. To use the GUI, the user must provide input. This can be read here: here

To use the Command, the user must provide input data (JSON file). This can be read here: here

Step (2) - JSON settings

The file path: BIMGISInteropLibs/IfcTerrain/ is essential for the control of the entire program flow. Different classes are stored here:

  • Config.cs - All essential settings for configuration are made here.

To store for the export of the metadata:

  • configDin18740.cs - according to DIN 18740-6
  • configDin91391.cs - according to DIN SPEC 91391-2

Step (3) - Interface

Another essential file for successful execution of a conversion is: BIMGISInteropLibs/IfcTerrain/ConnectionInterface.cs

This is used by both program parts (GUI and Command) to read the input data set and write it as an IFC file.

Step (4) - File reader (access)

First, a file reader (depending on the settings in config) reads the file (in its specific format) and prepares it for further processing.

Each reader is stored as "ReaderTerrain.cs" in the folder "BIMGISInteropsLibs" - in the corresponding subfolder.

Step (5) - Transfer from the file readers

For the exchange between file reader & IFC writer the class (Result) from is used: BIMGISInteropLibs/IFCTerrain/Result.cs This is therefore the most important element for the short data exchange.

Step (6) - IFC Writer

Now the corresponding (depending on the settings) IFC - Writer is called.

For more information about IFC-Writers the following page can be used: here

Step (7) - IFC file

The IFC Writer creates the desired export file. This step does not fail in most cases. Only if: the file path cannot be accessed (unlikely) or the model is empty.

Step (8) - additional export files

The program also writes the following files:

  • log file, controlled via: BimGISInteropsLibs/Logging/LogWriterIfcTerrain.cs


    only in IFCTerrain GUI:

  • setting file (*.json; reusable for the use of IFCTerrain Command)

  • metadata json file (if seleceted as as export)

The log file writes (depending on settings) the corresponding events. This can be read: here

The setting file will be exported under the use of IFCTerrain GUI. In the code-behind of the "MainWindow.xaml.cs". A json parser is used here. This also exports (depending on the setting / input) the metadata as another separate JSON file.

Step (9) - GUI feedback

In this step (caused by ConnectionInterface.cs) the user gets a feedback about the conversion done.

Hint: This is also done once an error has been caught in the program. (e.g.: TIN is empty after processing via the file readers)

Clone this wiki locally