I am new to the ifcopenshell lib. I can get elements info by its type,e.g.
ifcFile = ifcopenshell.open("filepath")
walls = ifcFile.by_type("IfcWall")
slabs = ifcFile.by_type("IfcSlab")
#Then do sth I want
just wondering can we separate elements based on their floor info?
I checked the doc but found nothing. Could someone give me a hint?
link
Just try call "IfcBuildingStorey" type
floors = ifcFile.by_type("IfcBuildingStorey")
for wall in walls:
contain = element.ContainedInStructure
if len(contain) > 0:
if contain[0].RelatingStructure.Name == floors[x]:
##your implementation.