I am currently working on a project to fetch all the details like IfcBuilding, IfcDistributionControlElement etc. from an IFC file stored in Opensource BIMserver. Using the Java client library, I managed to get a list of storeys and print their names.
List<IfcBuildingStorey> storeys = model.getAllWithSubTypes(IfcBuildingStorey.class));
for (IfcBuildingStorey storey : storeys) {
System.out.println(storey.getName());
}
Current Output:
Level 1
Level 2
Level 3
Level 4
What i want is for each storey, e.g. Level 2, to get all the rooms located in that storey, and then all entities of type IfcProduct, e.g. fire detectors, inside those rooms in a hierarchical way.
Expected Output:
Level 2
Room 1: entity 1, entity 2, entity 3, entity 4
Room 2: entity 1, entity 2, entity 3, entity 4
Room 3: entity 1, entity 2, entity 3, entity 4