From d5dc069b2f37fd35a5280dfbbac053c8b87c0ba2 Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Thu, 16 Jul 2026 14:27:25 +0500 Subject: [PATCH] util.schema: fix `geometry_classes_introduced_after` using wrong IFC4X3 schema It was passing `IFC4X3` directly to `schema_by_name` which is expecting schema identifier (e.g. IFC4X3_ADD2, not IFC4X3 allowed by `IFC_SCHEMA` - IFC4X3 is one of the IFC4X3 iterations while it was in development, not the final one). Noticed by tests failing: FAILED test/util/test_schema.py::TestGeometryClassesIntroducedAfter::test_ifc4x3_to_ifc2x3_is_superset_of_ifc4_to_ifc2x3 - RuntimeError: No schema named IFC4X3 FAILED test/util/test_schema.py::TestGeometryClassesIntroducedAfter::test_ifc4_to_ifc4x3_is_empty - RuntimeError: No schema named IFC4X3 --- src/ifcopenshell-python/ifcopenshell/util/schema.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ifcopenshell-python/ifcopenshell/util/schema.py b/src/ifcopenshell-python/ifcopenshell/util/schema.py index e755095bdf..aec74ac7cc 100644 --- a/src/ifcopenshell-python/ifcopenshell/util/schema.py +++ b/src/ifcopenshell-python/ifcopenshell/util/schema.py @@ -175,8 +175,8 @@ def geometry_classes_introduced_after(target_schema: IFC_SCHEMA, source_schema: B-splines, advanced surfaces, alignment curves on IFC4X3 → 2X3, …) or purge. Defaults match the IFC4 → IFC2X3 case for backwards compatibility with the original caller.""" - source = ifcopenshell_wrapper.schema_by_name(source_schema) - target = ifcopenshell_wrapper.schema_by_name(target_schema) + source = ifcopenshell.schema_by_name(source_schema) + target = ifcopenshell.schema_by_name(target_schema) target_names = {decl.name() for decl in target.entities()} result: set[str] = set() for decl in source.entities():