Created
September 14, 2025 12:47
-
-
Save chuongmep/81c119ed8fef698b4320696d5b9e4e09 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # %pip install ifcopenshell | |
| # %pip install ifcpatch | |
| import ifcopenshell | |
| # Load an IFC file | |
| ifc_file = ifcopenshell.open("Snowdon Towers Sample Architectural.ifc") | |
| import ifcpatch | |
| from ifcpatch.recipes import Ifc2Sql | |
| # For SQLite | |
| patcher = Ifc2Sql.Patcher( | |
| ifcopenshell.open("Snowdon Towers Sample Architectural.ifc"), | |
| sql_type="SQLite", | |
| database="output.sqlite", # Path to your SQLite database file | |
| # Optional arguments: | |
| # full_schema=True, | |
| # is_strict=False, | |
| # should_expand=True, | |
| # should_get_inverses=True, | |
| # should_get_psets=True, | |
| # should_get_geometry=True, | |
| ) | |
| patcher.patch() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment