jyrkioraskari/IFCtoLBD

bot:containsElement between storey and element is incorrectly converted from IFC

Opened this issue · 3 comments

The IFC data structure (and by extension those from other CAD/BIM modeling tools) have a different way of handling storeys in comparison to BOT. In the case of IFC, storeys are two dimensional horizontal planes and every building element (wall, door, window, etc.) is modeled with an optional offset towards this storey. In the case of BOT, bot:Storeys are 3D volumes that either contain (bot:containsElement) OR is adjacent to a certain element (bot:adjacentElement).

In IFC, every space and building element is connected to an IfcBuildingStorey, because this is the reference for the space/element geometry location. If after the conversion to LBD, the building element is contained in a space, then one can correctly infer that the storey containing this space also contains the element:

inst:storey1 bot:hasSpace inst:spaceA .
inst:spaceA bot:containsElement inst:deskA .

=> infers:
inst:storey1 bot:containsElement int:deskA .
But if a building element is adjacent to a space, one cannot infer that it is adjacent to OR contained in the storey that contains the space:

inst:storey1 bot:hasSpace inst:spaceA .
inst:spaceA bot:adjacentElement inst:wallA .

=> does not infer (which is correct):
inst:storey1 bot:adjacentElement inst:wallA

I've posted an issue on the BOT github (w3c-lbd-cg/bot#23), to add a superproperty called bot:relatedElement, of bot:containsElement and bot:adjacentElement. The IFCtoLBD converter however, could look to the 'isExternal' property of the IFC building elements, to explicitly state if it is an internal or external element. With example:

inst:storey1 bot:hasSpace inst:spaceA .
inst:spaceA bot:adjacentElement inst:wallA .

IF: inst:wallA props:isExternal | props:isExternal_simple true .
THEN: inst:storey1 bot:adjacentElement inst:wallA .
ELSE: inst:storey1 bot:containsElement inst:wallA .

We now (wrongly) take the IfcBuildingStorey of an IFC element and make it by default explicitly contained in the storey, while it can also be adjacent to that storey if it is an external element.

This is doable. To avoid handling the properties twice, the props:isExternal | props:isExternal_simple properties be created before the selection of bot:adjacentElement/bot:containsElement.

Okay, so working points for the converter:

  • extra option below BOT for the user in the UI: if selected, the converter will scan the building elements for the isExternal property.
    -- If an element is adjacent to a space AND the isExternal property of the element is 'true', then the converter will make a bot:adjacentElement between the element and the storey that contains the same space
    -- If an element is adjacent to a space AND the isExternal property of the element is 'false', then the converter will make a bot:containedElement between the element and the storey that contains the same space
    -- If an element is contained in a space, the reasoner will infer (using BOT) that the storey that contains the space, also contains the element. In other words: the converter should not be changed for this case
  • Now, we analyse the ifcOWL instance graph to find relations between IfcBuildingStoreys and building elements. There is an important difference here between how IFC (and other BIM tools) handle storeys: they define it as a horizontal plane, and building elements are modeled with an offset towards these storeys. In BOT, a storey is a 3D volume and an element can be contained or adjacent to the storey. These are two different things, and therefore, I think the IFCtoLBD should not convert this direct IFC relation between an IfcBuildingStorey and an IfcElement in a bot:containsElement. The bot:containsElement and bot:adjacentElement property between the element and the storey has to be derived as illustrated above, by using the space. What could be done here, is to add an extra property between the element and the storey to 'convert' the direct IFC relation between the element and the storey (e.g. inst:elementA ex:hasIfcStorey inst:storey1). This property would be unrelated to bot:containsElement or bot:adjacentElement
  • If you would continue about the storey-difference between BOT and IFC (and other BIM modeling tools), one has to see that an IfcSpace also has a direct IFC relation to an IfcBuildingStorey, and that this doesn't mean that the derived triple 'inst:storey1 bot:hasSpace inst:spaceA' is valid, as the space (similar as the element in the last point) is just defined with an offset towards the IfcBuildingStorey (the horizontal plane). It would be more correct to 'convert' this IFC relation to a similar relation as between storeys and elements (e.g. inst:spaceA ex:hasIfcStorey inst:storey1), which is in this case totally unrelated to bot:hasSpace. In 99% of the cases a bot:hasStorey relation is valid, if the BIM modeler watched out to model each building element or space on the right storey. There are situations however with some spaces (e.g. stairwells and shafts) and elements that run over multiple storeys (walls, pipes, stairs), where the space/element is contained in or adjacent to multiple bot:Storeys. In this case, we could check for the lowest and highest point of the space/elements bounding box based on the geometry. For a temporary solution, I would opt to keep on converting the direct IFC relation between a space and a storey as we do now (using bot:hasSpace).