Autodesk / revit-ifc

IFC for Revit and Navisworks (2019+)
486 stars 196 forks source link

How to get IfcDoor relation to IfcSpace (using IfcRelContainedInSpatialStructure)? #91

Open stegh opened 5 years ago

stegh commented 5 years ago

How to get IfcDoor relation to IfcSpace (using IfcRelContainedInSpatialStructure)?

In Revit the relevant data is there, e.g. see this screenshot, - doors have information "from" and "to" (this is from a very basic example model, I could change the direction from/to room, but you get the picture 😎)

autodesk_revit_2018_beispiel_tuerliste

The IFC export using IFC for Revit only has relations to IfcBuildingStorey using IfcRelContainedInSpatialStructure, but not to IfcSpace(s):

#39108= IFCRELCONTAINEDINSPATIALSTRUCTURE('29N4sXzGDECg1BgumGBI7c',#41,$,$,(#3794,#4143,#4333,#5134,#5261,#5332,#5402,#5486,#5573,#5646,#5716,#5786,#5856,#5946,#8035,#10092,#10185,#10277,#10380,#10455,#10547,#10639,#10731,#10834,#10920,#11006,#11092,#11178,#11264,#33451,#33527,#34297,#34505,#35028,#35710,#36393,#36495,#36601,#36907,#37016,#37181,#37346,#38240,#38354,#38579),#127); Here's a screenshot from BIMserver / bimvie.ws that shows the same data: ifc_beispiel_ifcrelcontainedinspatialstructure

We need/want IfcDoor relations to IfcSpace(s), - is there a way to make this possible?

I've seen similar questions, and some answers which suggested "work-arounds" like new parameters in Revit for doors, and entering/calculating the room information there, - but I don't want to go that way. A similar issue (for different software) can be found here: How to get IfcWindow associated with a space?

I'd want to do it correctly using IfcRelContainedInSpatialStructure

But how to do it? 🤷‍♂😉🤔⁉

Regards, Thomas

AngelVelezSosa commented 5 years ago

Hmm. I'm not sure if it is OK for a door to be "contained" in 2 rooms. That seems like it may be a limitation of IFC. Could you post that question in https://forums.buildingsmart.org/ and see what some of the other experts say?

klacol commented 5 years ago

The semantic definition of IfcRelContainedInSpatialStructure is as following:

This objectified relationship, IfcRelContainedInSpatialStructure, is used to assign elements to a certain level of the spatial project structure. Any element can only be assigned once to a certain level of the spatial structure. The question, which level is relevant for which type of element, can only be answered within the context of a particular project and might vary within the various regions.

Even, if the name "contained in" suggests, the element should be contained within the storey or space, the definition says, that is a relationship, to assign the element to the appropriate spatial structure.

Since Revit knows for each door even two rooms (the "from room" and the "to room"), it is a limitation to assign the door to none of them, and to reduce the relationship only to the storey.

I would prefer, that the IFC exporter assigns every door to the "to room".

klacol commented 5 years ago

If you would want to store both rooms, you would create a separate zone for each door, that combines the two rooms and relate this zone to the door.

image

This would be like this:

image

klacol commented 5 years ago

We have realized now an exporter for Revit 2018, that can export doors with a direct relationship to the "to"-room based on IfcRelContainedInSpatialStructure.

This version ist available here: https://github.com/e-task/revit-ifc/commit/b7923818acafadb32266768bd0e207eaa14924d0

The export can be configured in the export dialog with the new option "The door (IfcDoor) belongs to the room (IfcSpace)" as follows:

image

This export is compliant with ISO 16739 (IFC) and the Coordination View.

AngelVelezSosa commented 5 years ago

Feel free to make a pull request to add this to the main branch. I'd suggest perhaps using something like "Relate doors to rooms" as the checkbox text.

tcosse commented 4 years ago

image

I'm probably arriving a little late but here is my insight on the matter :

It is possible to link a room to a door (and vice versa) by exporting its Space Boundaries

Moult commented 2 years ago

Resurrecting this since cobie and Bem define doors maintainable and expect them to be contained in a space.

The solution is to the contained in either the to or from space. If the other (to or from) is also wanted, IFC references spatial structure should be used.

The diagram shown by @klacol is not valid IFC and should not be followed. Zones are not part of the spatial hierarchy. Both rels used are invalid.

YasmineArcadis commented 1 year ago

@AngelVelezSosa : DO you know if this could be picked up again for Revit 2022/2023 exporter?