Rework equality and get_info_2

This commit is contained in:
Thomas Krijnen
2026-01-15 12:37:12 +01:00
parent cf3393b6a0
commit 490fa92dc0
3 changed files with 107 additions and 44 deletions
@@ -394,7 +394,6 @@ class entity_instance_mixin:
* ignore: `()` (empty tuple)
"""
assert recursive
assert return_type is dict
assert len(ignore) == 0
return ifcopenshell_wrapper.get_info_cpp(self, include_identifier)
return ifcopenshell_wrapper.get_info_cpp(self, recursive, include_identifier)
@@ -67,3 +67,12 @@ class TestGetInfo2(test.bootstrap.IFC4):
"Outer": {"CfsFaces": None, "type": "IfcClosedShell"},
"type": "IfcFacetedBrep",
}
def test_equality():
f = ifcopenshell.file()
g = ifcopenshell.file()
f.createIfcCartesianPoint((0., 0.))
g.createIfcCartesianPoint((0., 0.))
assert f[1] == g[1]
g[1].Coordinates = (1., 0.)
assert f[1] != g[1]