Skip to content

Digital-Building-Process-TU-Wien/LightEntryModel-IFC-generator

Repository files navigation

Light Entry Model Generator

This generator creates IFC4X3 models containing light entry areas based on coordinates provided in JSON format. It processes 3D triangle coordinates of light entry areas and light prisms (clear view and light incidence representations), groups them by spaces, and produces an informative geometric representation as an IFC file. The light entry areas and light prisms originate from automated compliance checks against Austrian building regulations for model-based digital building permits.

The script translates the triangular mesh data into complex IFC entities using IfcOpenShell, numpy, and shapely, resulting in IfcPolygonalFaceSet elements and IfcExtrudedAreaSolid representations for clear view and light incidence prisms. It maps property sets and quantity sets to elements representing these areas.

Project structure

  1. Folder InputJSON: Contains the default input JSON geometries (e.g., LightEntryCoordinate-List.json).
  2. Folder output: Recommended output path for generated IFC models.
  3. light-entry-model-generator.py: Main script to generate the IFC models.
  4. LightEntryModel.ifc: Correctly generated LightEntryModel for reference.
  5. requirements.txt: Text file containing the required dependencies.

All data files are licensed under CC BY 4.0, all software files are licensed under MIT License.

Installation

  1. Clone or download this repository
  2. Install Python
  3. Open Terminal in the project folder
  4. Create a virtual environment:
    python -m venv venv
  5. Activate the virtual environment:
    • Linux/macOS:
      source venv/bin/activate
    • Windows:
      venv\Scripts\activate
  6. Install all dependencies:
    pip install -r requirements.txt

Run the project

Try the project with our example JSON file located at ./InputJSON/LightEntryCoordinate-List.json:

python light-entry-model-generator.py

Resulting IFC model is written to the root directory as:

LightEntryModel.ifc

Override the input and output paths

The default input and output paths can be overwritten either directly in the script or via command line arguments.

Override the input and output paths in the script

To override the input and output paths, you can edit the default settings in lines 12-13 in the main script light-entry-model-generator.py:

#Default settings
default_input_filename = "./InputJSON/LightEntryCoordinate-List.json"
default_output_filename = "LightEntryModel.ifc"

Override the input and output paths via command line arguments

python light-entry-model-generator.py -h
usage: light-entry-model-generator.py [-h] [-i INPUT_FILE] [-o OUTPUT_FILE]

Generate IFC Light Entry Models from JSON data.

options:
  -h, --help            show this help message and exit
  -i INPUT_FILE, --input_file INPUT_FILE
                        Path to the input JSON file containing light entry coordinates.
  -o OUTPUT_FILE, --output_file OUTPUT_FILE
                        Path to the output IFC file.

To run with custom paths, provide the arguments explicitly:

python light-entry-model-generator.py -i custom_input.json -o my_output.ifc

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages