Basic implementation to bulk convert relevant IFC classes to a Brick model

This commit is contained in:
Dion Moult
2022-01-10 17:30:49 +11:00
parent 666e484b2b
commit 7a6df49348
9 changed files with 99 additions and 1 deletions
+23
View File
@@ -186,6 +186,13 @@ class TestGetBrick(NewFile):
assert subject.get_brick(element) == "http://example.org/digitaltwin#globalid"
class TestGetBrickClass(NewFile):
def test_run(self):
ifc = ifcopenshell.file()
element = ifc.createIfcAirTerminalBox()
assert subject.get_brick_class(element) == "https://brickschema.org/schema/Brick#TerminalUnit"
class TestGetBrickPath(NewFile):
def test_run(self):
TestLoadBrickFile().test_run()
@@ -208,6 +215,17 @@ class TestGetBrickifcProject(NewFile):
)
class TestGetConvertableBrickObjectsAndElements(NewFile):
def test_run(self):
ifc = ifcopenshell.file()
tool.Ifc.set(ifc)
element = ifc.createIfcAirTerminalBox()
obj = bpy.data.objects.new("Object", None)
tool.Ifc.link(element, obj)
ifc.createIfcWall()
assert subject.get_convertable_brick_objects_and_elements() == [(obj, element)]
class TestGetItemClass(NewFile):
def test_run(self):
TestLoadBrickFile().test_run()
@@ -286,6 +304,11 @@ class TestPopBrickBreadcrumb(NewFile):
assert bpy.context.scene.BIMBrickProperties.brick_breadcrumbs[0].name == "foo"
class TestRunAddBrick(NewFile):
def test_nothing(self):
pass
class TestRunAssignBrickReference(NewFile):
def test_nothing(self):
pass