IDS icon indicating copy to clipboard operation
IDS copied to clipboard

Conditional PartOf specifications

Open atomczak opened this issue 1 year ago • 4 comments

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).

atomczak avatar Nov 13 '24 13:11 atomczak

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

atomczak avatar Nov 13 '24 14:11 atomczak

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.

NickNisbet avatar Nov 13 '24 14:11 NickNisbet

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?

andyward avatar Nov 13 '24 15:11 andyward

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)

atomczak avatar Nov 13 '24 16:11 atomczak