mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-12 14:33:28 +00:00
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
This commit is contained in:
@@ -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
|
B-splines, advanced surfaces, alignment curves on IFC4X3 → 2X3, …) or
|
||||||
purge. Defaults match the IFC4 → IFC2X3 case for backwards compatibility
|
purge. Defaults match the IFC4 → IFC2X3 case for backwards compatibility
|
||||||
with the original caller."""
|
with the original caller."""
|
||||||
source = ifcopenshell_wrapper.schema_by_name(source_schema)
|
source = ifcopenshell.schema_by_name(source_schema)
|
||||||
target = ifcopenshell_wrapper.schema_by_name(target_schema)
|
target = ifcopenshell.schema_by_name(target_schema)
|
||||||
target_names = {decl.name() for decl in target.entities()}
|
target_names = {decl.name() for decl in target.entities()}
|
||||||
result: set[str] = set()
|
result: set[str] = set()
|
||||||
for decl in source.entities():
|
for decl in source.entities():
|
||||||
|
|||||||
Reference in New Issue
Block a user