def test_link_a_material_and_style(self): ifc = ifcopenshell.file() subject.set(ifc) style = ifc.createIfcSurfaceStyle() material = ifc.createIfcMaterial() obj = bpy.data.materials.new("Material") subject.link(style, obj) subject.link(material, obj) assert subject.get_entity(obj) == material assert subject.get_object(style) == obj assert subject.get_object(material) == obj
def test_run(self): ifc = ifcopenshell.file() subject.set(ifc) element = ifc.createIfcWall() obj = bpy.data.objects.new("Object", None) subject.link(element, obj) assert subject.get_object(element) == obj
def test_link_a_style(self): ifc = ifcopenshell.file() subject.set(ifc) element = ifc.createIfcSurfaceStyle() obj = bpy.data.materials.new("Material") subject.link(element, obj) assert subject.get_object(element) == obj
def test_link_a_material(self): ifc = ifcopenshell.file() subject.set(ifc) element = ifc.createIfcMaterial() obj = bpy.data.materials.new("Material") subject.link(element, obj) assert subject.get_entity(obj) == element assert subject.get_object(element) == obj
def test_unlinking_using_an_element(self): ifc = ifcopenshell.file() subject.set(ifc) element = ifc.createIfcWall() obj = bpy.data.objects.new("Object", None) subject.link(element, obj) subject.unlink(element=element) assert subject.get_entity(obj) is None assert subject.get_object(element) is None