mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 17:31:45 +00:00
Make Brick "root_classes" one source of truth
This commit is contained in:
@@ -52,11 +52,7 @@ def get_brick_entity_classes(self, context):
|
||||
|
||||
|
||||
def get_brick_roots(self, context):
|
||||
return [("System", "System", ""),
|
||||
("Location", "Location", ""),
|
||||
("Equipment", "Equipment", ""),
|
||||
("Point", "Point", "")
|
||||
]
|
||||
return BrickStore.root_classes
|
||||
|
||||
|
||||
class Brick(PropertyGroup):
|
||||
|
||||
@@ -345,6 +345,7 @@ class BrickStore:
|
||||
current_changesets = 0
|
||||
history_size = 64
|
||||
namespaces = []
|
||||
root_classes = [("Equipment", "Equipment", ""), ("Location", "Location", ""), ("System", "System", ""), ("Point", "Point", "")]
|
||||
entity_classes = {}
|
||||
|
||||
@staticmethod
|
||||
@@ -374,8 +375,8 @@ class BrickStore:
|
||||
|
||||
@classmethod
|
||||
def load_entity_classes(cls):
|
||||
root_classes = ["System", "Location", "Equipment", "Point"]
|
||||
for root_class in root_classes:
|
||||
|
||||
for root_class, __, __ in BrickStore.root_classes:
|
||||
query = BrickStore.graph.query(
|
||||
"""
|
||||
PREFIX brick: <https://brickschema.org/schema/Brick#>
|
||||
|
||||
Reference in New Issue
Block a user