Conditional PartOf specifications
Discussed in https://github.com/buildingSMART/IDS/discussions/341
Originally posted by andyward September 12, 2024 I'd like to write a specification that implements the requirement that All spaces belonging to a BuildingStorey '01' should have their space names matching '01-.*' (or the converse requirement: Spaces named like '01-.*' must be part of a BuildingStorey with Name '01' )
I'm struggling to see how I could do this in IDS1.0. I was hoping to be able to do this with the partOf facet and using RelAggregates but there's no obvious way to apply a requirement to the 'child' side of the relationship.
e.g.
<specification name="Spaces on level '01' must be named based on the level" ifcVersion="IFC2X3">
<applicability maxOccurs="unbounded">
<entity>
<name>
<simpleValue>IFCBUILDINGSTOREY</simpleValue>
</name>
</entity>
<ids:attribute>
<ids:name>
<simpleValue>Name</simpleValue>
</ids:name>
<ids:value>
<simpleValue>01</simpleValue>
</ids:value>
</ids:attribute>
</applicability>
<requirements>
<partOf relation="IFCRELAGGREGATES">
<entity>
<name>
<simpleValue>IFCSPACE</simpleValue>
</name>
</entity>
<!-- and these spaces should have Name attribute matching pattern '01-.*' -->
</partOf>
</requirements>
</specification>
Any ideas? or is this a usecase to consider for a future IDS? I'd imagine similar use cases for things like ensuring components are in the correct IfcSystem (by classification, name etc).
How about this https://github.com/buildingSMART/IDS/pull/380? Simply allow any facet in PartOf, except PartOf itself, with a minimum of one entity. The implementers' agreement would be that those subfacets apply to the PartOf entity itself. @andyward
Before going down this route, lets do a review of the overall syntax and back/forward-referencing. Otherwise we could be revisiiting this to add more and more syntaxes for ever.
How about this #380? Simply allow any facet in PartOf, except PartOf itself, with a minimum of one entity. The implementers' agreement would be that those subfacets apply to the PartOf entity itself. @andyward
Nice- Looks like it would satisfy the requirement, and seems simple and non-breaking for a 1.1 release. Not sure about the wider syntax review - but that feels like an IDS2 thing if we're making major changes (e.g. Exclusions etc)? Because we're re-using the existing facetTypes this would pick up any future changes anyway?
I agree with @andyward; this is an acceptable minor change for 1.1, unlike any bigger syntax changes. @NickNisbet, can you document the exact changes you want to propose in Discussions? (unless it's already there)