This commit is contained in:
Andrej730
2024-08-30 16:56:13 +05:00
parent ccbb253d2c
commit 3c333c6b59
8 changed files with 17 additions and 11 deletions
@@ -60,7 +60,7 @@ IFC4x3_SPEC_URL_TEMPLATE = "https://ifc43-docs.standards.buildingsmart.org/IFC/R
# child -> description
# note: in IFC4x3 there is no children[] for properties
SUPPORTED_SCHEMA = Literal["IFC2X3", "IFC4", "IFC4X3"]
SUPPORTED_SCHEMA = ifcopenshell.util.schema.IFC_SCHEMA
SCHEMA_FILES: dict[SUPPORTED_SCHEMA, dict] = {
"IFC2X3": {
"entities": BASE_MODULE_PATH / "schema/ifc2x3_entities.json",
@@ -22,11 +22,12 @@ import time
import ifcopenshell
import ifcopenshell.util.attribute
import ifcopenshell.ifcopenshell_wrapper as ifcopenshell_wrapper
from typing import Union, Any
from typing import Union, Any, Literal
# This is highly experimental and incomplete, however, it may work for simple datasets.
cwd = os.path.dirname(os.path.realpath(__file__))
IFC_SCHEMA = Literal["IFC2X3", "IFC4", "IFC4X3"]
def get_fallback_schema(version: str) -> str:
@@ -23,8 +23,8 @@ from typing import List
cwd = os.path.dirname(os.path.realpath(__file__))
entity_to_type_map = {}
type_to_entity_map = {}
entity_to_type_map: dict[ifcopenshell.util.schema.IFC_SCHEMA, dict[str, list[str]]] = {}
type_to_entity_map: dict[ifcopenshell.util.schema.IFC_SCHEMA, dict[str, list[str]]] = {}
mapped_schemas = {
"IFC2X3": "entity_to_type_map_2x3.json",