Slide 1

Slide 1 text

Advanced python IFC + computational geometry

Slide 2

Slide 2 text

Guest lecturer • Thomas Krijnen • past: Post-doctoral researcher @ TU Delft, NL • past: PhD @ TU Eindhoven, NL • Founder AECgeeks • Maintainer IfcOpenShell.org • ✉ [email protected] • 🐤 @aothms

Slide 3

Slide 3 text

Why python - Batteries included: - web: flask, django, e.g view.ifcopenshell.org - machine learning: pytorch, tensorflow, keras, scikit, … - geometry: pythonOCC, shapely, … - graphs: networkx, rdflib, … - Readable syntax, reasonable semantics wrt typing, expressive types (e.g sets, containment operators, …) - Interpreted (no lengthy compilation times) and high performance possible (e.g numpy, numba, pypy, …)

Slide 4

Slide 4 text

Work (1) - geometric analysis for code compliance checking https://github.com/opensourceBIM/voxelization_toolkit

Slide 5

Slide 5 text

Work (2) - model validation https://github.com/buildingSMART/validate

Slide 6

Slide 6 text

Setup https://docs.conda.io/en/latest/miniconda.html conda create -n course2022 conda activate course2022 conda install -c conda-forge pythonocc-core ifcopenshell jupyter

Slide 7

Slide 7 text

Anatomy of a simple Python script

Slide 8

Slide 8 text

Data extraction using IfcOpenShell Python

Slide 9

Slide 9 text

Entities and attributes

Slide 10

Slide 10 text

Inverse attributes

Slide 11

Slide 11 text

Comparison with a SPARQL query basic graph pattern aggregate function / makes this a property path, a sequence of two predicates in this used because in IfcOWL the specific type of the property nominal is emitted. IfcAreaMeasure in this case.

Slide 12

Slide 12 text

Example with geometry

Slide 13

Slide 13 text

The complexity of IFC

Slide 14

Slide 14 text

Continue on http://web.archive.org/web/20200711032105/http://www. pythonocc.org/quick-examples/machine-learning-and- building-models/ https://academy.ifcopenshell.org/posts/using-ifcopenshell- and-pythonocc-to-construct-new-geometry/ https://github.com/AECgeeks/tue-python-workshop-2022