constructpy

Constructpy

image

Constructpy is a python library that performs constructability assessment tests on Industry Foundation Classes (IFC) BIM models.

Features

Constructpy currently features 7 constructability tests divided into 3 categories (standardization, simplicity and accessibility). The tests are based on similar constructability assessment suite provided by the ECOS Revit plugin, described in Barros[1], but also takes into account some constructability assessment methods described in Tauriainen et al[2]. A short description of each test is provided below.

Standardization

Simplicity

Accessibility

All tests query the IFC database and return a score between 0 and 1 where 0 is the minimum constructability score and 1 the maximum. The IFC objects queried and the specific test criteria are described in depth in the documentation (WIP).

Installation

Use the pip to install constructpy.

pip install constructpy

Constructpy depends on ifcopenshell and geopy libraries, if you intend to run the notebook provided in the example folder you also need jupyter-notebook, matplotlib and k3d to be installed. You can install the optional dependecies with the pip command below.

pip install constructpy[extra]

Usage

To use constructpy you need an IFC4 file (prior versions of IFC are not supported). To perform a full constructability assessment you’ll first need to load the IFC as an ifcopenshell object, then pass it to a Constructability object along with optional weights to be used in the calculation of the assessment scores.

import ifcopenshell
from constructpy import Constructability

# Create an ifcopenshell ifc object
ifc_file = '<path_to/ifc_file.ifc>'
ifc = ifcopenshell.open(ifc_file)

# Set weights for constructability score calculation
stardardization_weight = 0.8
simplicity_weight = 1.0
accessibiliti_weight = 0.6

# Create a Constructability object passing the ifc and weights
con = Constructability(ifc, standardization_weight, simplicity_weight, accessibility_weight)

# Access the constructability scores as attributes of the object
constructability_score = con.constructability_score
standardization_score = con.standardization_score
simplicity_score = con.simplity_score
accessibility_score = con.accessibility_score

Aside from the general constructability score and the score for each category as shown in the snippet above, it is also possible to access the individual tests scores, which can also have individual weights set. For more in depth information on the library objects refer to the documentation(WIP). A jupyter notebook is also provided in the examples folder and showcases a basic usage of the library.

License

Free software: MIT License

References