mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-11 18:16:40 +00:00
Fix interface bug where representations assigned directly to a context aren't shown
This commit is contained in:
@@ -49,15 +49,17 @@ class RepresentationsData:
|
||||
if representation_type == "MappedRepresentation":
|
||||
representation_type = representation.Items[0].MappingSource.MappedRepresentation.RepresentationType
|
||||
representation_type += "*"
|
||||
results.append(
|
||||
{
|
||||
"id": representation.id(),
|
||||
"ContextType": representation.ContextOfItems.ContextType,
|
||||
"ContextIdentifier": representation.ContextOfItems.ContextIdentifier,
|
||||
"TargetView": representation.ContextOfItems.TargetView,
|
||||
"RepresentationType": representation_type,
|
||||
}
|
||||
)
|
||||
data = {
|
||||
"id": representation.id(),
|
||||
"ContextType": representation.ContextOfItems.ContextType or "",
|
||||
"ContextIdentifier": "",
|
||||
"TargetView": "",
|
||||
"RepresentationType": representation_type or "",
|
||||
}
|
||||
if representation.ContextOfItems.is_a("IfcGeometricRepresentationSubContext"):
|
||||
data["ContextIdentifier"] = representation.ContextOfItems.ContextIdentifier or ""
|
||||
data["TargetView"] = representation.ContextOfItems.TargetView or ""
|
||||
results.append(data)
|
||||
return results
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user