From 872efac4d261fba3390accc9ecfc3b200cc50318 Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Wed, 22 Jul 2026 16:09:13 +0500 Subject: [PATCH] parse_ifcxml: drop the use of the removed method --- src/bonsai/bonsai/bim/ifc.py | 2 +- src/ifcopenshell-python/ifcopenshell/__init__.py | 5 +---- .../ifcopenshell/ifcopenshell_wrapper.pyi | 1 - 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/bonsai/bonsai/bim/ifc.py b/src/bonsai/bonsai/bim/ifc.py index 5656e7c561..6c02227192 100644 --- a/src/bonsai/bonsai/bim/ifc.py +++ b/src/bonsai/bonsai/bim/ifc.py @@ -243,7 +243,7 @@ class IfcStore: IfcStore.file = ifcopenshell.open(filename) return elif extension.lower() == "ifcxml": - IfcStore.file = ifcopenshell.file(ifcopenshell.ifcopenshell_wrapper.parse_ifcxml(path)) + raise NotImplementedError("Reading .ifcXML files is not currently supported.") elif prefs.should_stream: IfcStore.file = ifcopenshell.open(path, should_stream=True) else: diff --git a/src/ifcopenshell-python/ifcopenshell/__init__.py b/src/ifcopenshell-python/ifcopenshell/__init__.py index c8bca746d6..4dd11c1ed6 100644 --- a/src/ifcopenshell-python/ifcopenshell/__init__.py +++ b/src/ifcopenshell-python/ifcopenshell/__init__.py @@ -222,10 +222,7 @@ def open( format = guess_format(path) logger = logger_or_root(logger) if format == ".ifcXML": - f = ifcopenshell_wrapper.parse_ifcxml(str(path.absolute()), *((logger,) if logger is not None else ())) - if f: - return file(f) - raise OSError(f"Failed to parse .ifcXML file from {path}") + raise NotImplementedError("Reading .ifcXML files is not currently supported.") if format == ".ifcZIP": with tempfile.TemporaryDirectory() as unzipped_path: with zipfile.ZipFile(path) as zf: diff --git a/src/ifcopenshell-python/ifcopenshell/ifcopenshell_wrapper.pyi b/src/ifcopenshell-python/ifcopenshell/ifcopenshell_wrapper.pyi index 768419e5de..c7ae9cf50d 100644 --- a/src/ifcopenshell-python/ifcopenshell/ifcopenshell_wrapper.pyi +++ b/src/ifcopenshell-python/ifcopenshell/ifcopenshell_wrapper.pyi @@ -1640,7 +1640,6 @@ def map_shape(settings, instance): ... def nary_union(sequence): ... def new_IfcBaseClass(schema_identifier: str, name: str) -> entity_instance: ... def open(fn: str, readonly: bool = False, logger=None) -> file: ... -def parse_ifcxml(filename): ... def polygons_to_svg(*args): ... def read(data): ... def register_schema(arg1): ...