mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-27 02:31:09 +00:00
Simplify unnecessary code to get representations
This commit is contained in:
@@ -185,17 +185,14 @@ class IfcParser():
|
|||||||
return elements
|
return elements
|
||||||
|
|
||||||
def get_representations(self):
|
def get_representations(self):
|
||||||
representations = {}
|
results = []
|
||||||
for object in self.selected_products + self.selected_types:
|
for object in self.selected_products + self.selected_types:
|
||||||
if not object.data:
|
if not object.data:
|
||||||
continue
|
continue
|
||||||
representations[object.data.name] = object.data
|
|
||||||
results = []
|
|
||||||
for name, value in representations.items():
|
|
||||||
results.append({
|
results.append({
|
||||||
'ifc': None,
|
'ifc': None,
|
||||||
'raw': value,
|
'raw': object.data,
|
||||||
'attributes': { 'Name': name }
|
'attributes': { 'Name': object.data.name }
|
||||||
})
|
})
|
||||||
return results
|
return results
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user