New utility to get IFC all elements that are relevant in Brickschema

This commit is contained in:
Dion Moult
2022-01-10 17:31:42 +11:00
parent 7a6df49348
commit 9b77bb6e37
2 changed files with 22 additions and 3 deletions
@@ -6,6 +6,13 @@ import ifcopenshell.util.brick as subject
class TestGetBrickTypeIFC4(test.bootstrap.IFC4):
def test_run(self):
element = self.file.createIfcAirTerminalBox()
assert subject.get_brick_type(element) == "TerminalUnit"
assert subject.get_brick_type(element) == "https://brickschema.org/schema/Brick#TerminalUnit"
element.PredefinedType = "CONSTANTFLOW"
assert subject.get_brick_type(element) == "CAV"
assert subject.get_brick_type(element) == "https://brickschema.org/schema/Brick#CAV"
class TestGetBrickElementsIFC4(test.bootstrap.IFC4):
def test_run(self):
element = self.file.createIfcAirTerminalBox()
self.file.createIfcWall()
assert subject.get_brick_elements(self.file) == [element]