mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-19 14:41:25 +00:00
Basic implementation to bulk convert relevant IFC classes to a Brick model
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user