(self)
| 78 | assert ifc_diff.change_register == {wall.GlobalId: {"attributes_changed": True}} |
| 79 | |
| 80 | def test_changed_geometry(self): |
| 81 | ifc_file = setup_project() |
| 82 | wall = ifcopenshell.api.root.create_entity(ifc_file, ifc_class="IfcWall", name="Foo") |
| 83 | context = ifcopenshell.util.representation.get_context(ifc_file, "Model", "Body", "MODEL_VIEW") |
| 84 | assert context |
| 85 | representation = ifcopenshell.api.geometry.add_slab_representation(ifc_file, context, depth=0.2) |
| 86 | ifcopenshell.api.geometry.assign_representation(ifc_file, wall, representation) |
| 87 | |
| 88 | new_file = ifc_file.from_string(ifc_file.to_string()) |
| 89 | extrusion = new_file.by_type("IfcExtrudedAreaSolid")[0] |
| 90 | extrusion.Depth = 500.0 |
| 91 | |
| 92 | ifc_diff = ifcdiff.IfcDiff(ifc_file, new_file, relationships=["geometry"]) |
| 93 | ifc_diff.diff() |
| 94 | assert ifc_diff.added_elements == set() |
| 95 | assert ifc_diff.deleted_elements == set() |
| 96 | assert ifc_diff.change_register == {wall.GlobalId: {"geometry_changed": True}} |
nothing calls this directly
no test coverage detected