mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 09:48:32 +00:00
implement classification facet
This commit is contained in:
@@ -121,14 +121,18 @@ class classification(facet):
|
||||
for association in inst.HasAssociations:
|
||||
if association.is_a("IfcRelAssociatesClassification"):
|
||||
cref = association.RelatingClassification
|
||||
refs.append((cref.ReferencedSource.Name, cref.ItemReference))
|
||||
|
||||
return facet_evaluation(
|
||||
(self.system, self.value) in refs,
|
||||
# @todo
|
||||
"[classification_eval_todo]",
|
||||
)
|
||||
refs.append((cref.ReferencedSource.Name, cref.Identification)) # before was .ItemReference instead of .Identification
|
||||
|
||||
if refs:
|
||||
return facet_evaluation(
|
||||
(self.system, self.value) in refs,
|
||||
self.message % {"system": refs[0][0], "value": refs[0][1]}
|
||||
)
|
||||
else:
|
||||
return facet_evaluation(
|
||||
False,
|
||||
"has no classification"
|
||||
)
|
||||
|
||||
class property(facet):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user