How to get IfcDoor relation to IfcSpace (using IfcRelContainedInSpatialStructure)?
- Dominant language
- C#
- Stars
- 637
- Forks
- 225
- PR merge metrics
- No merged PRs in 30d
Description
### 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](https://knowledge.autodesk.com/support/revit-products/learn-explore/caas/CloudHelp/cloudhelp/2018/ENU/Revit-Model/files/GUID-D45D0FAD-E192-419C-8F58-0F39DAAAE774-htm.html), but you get the picture 😎)

The IFC export using [IFC for Revit](https://sourceforge.net/projects/ifcexporter/files/) 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](https://github.com/opensourceBIM/BIMserver) / [bimvie.ws](https://github.com/opensourceBIM/bimvie.ws) that shows the same data:

**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?](https://github.com/xBimTeam/XbimEssentials/issues/121)
**I'd want to do it correctly using [IfcRelContainedInSpatialStructure](http://www.buildingsmart-tech.org/ifc/IFC4/Add2TC1/html/link/ifcrelcontainedinspatialstructure.htm)**
But how to do it? 🤷♂😉🤔⁉
Regards,
Thomas
Contributor guide
Research direction
Start by reviewing the IFC for Revit export behavior described in the issue, especially the IfcRelContainedInSpatialStructure relation and its current links to IfcBuildingStorey. Compare that behavior with the requested IfcDoor-to-IfcSpace relationship and the referenced IFC documentation; done means the supported approach and required exporter change are clearly established.
Written by the indexing model from the issue text.
Assessment
- Domain
- data
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100