Fix bug where imported grids were not linked and didn't auto track edits

This commit is contained in:
Dion Moult
2021-10-28 19:08:01 +11:00
parent d013d6ed09
commit b67d56ada1
5 changed files with 93 additions and 19 deletions
+11
View File
@@ -80,6 +80,17 @@ class TestCanContain(NewFile):
tool.Ifc.link(element, element_obj)
assert subject.can_contain(structure_obj, element_obj) is False
def test_other_non_elements_that_have_a_contained_in_structure_attribute_can_be_contained(self):
ifc = ifcopenshell.file()
tool.Ifc.set(ifc)
structure = ifc.createIfcSite()
structure_obj = bpy.data.objects.new("Object", None)
tool.Ifc.link(structure, structure_obj)
element = ifc.createIfcGrid()
element_obj = bpy.data.objects.new("Object", None)
tool.Ifc.link(element, element_obj)
assert subject.can_contain(structure_obj, element_obj) is True
class TestDisableEditing(NewFile):
def test_run(self):