buildingSMART / IDS

Computer interpretable (XML) standard to define Information Delivery Specifications for BIM (mainly used for IFC)
Other
167 stars 52 forks source link

Problem of understanding documentation regarding Facets. #271

Open Enrra44 opened 1 month ago

Enrra44 commented 1 month ago

The problem I encounter is the possibility of using some facets as an applicability. It says in the documentation that we can use every facet as an applicability, but it doesn't work as I thought it would.

For example, when using the facet Attribute as an applicability intention, I would expect : Any entity with an Attribute "GlobalId". Therefore, because every entity has an Attribute global ID, I would expect to get a pass, but I get a fail.

<ns0:ids xmlns:ns0="http://standards.buildingsmart.org/IDS" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://standards.buildingsmart.org/IDS ids.xsd">
    <ns0:info>
        <ns0:title>0012 - Attribute GlobalId</ns0:title>
    </ns0:info>
    <ns0:specifications>
        <specification name="" ifcVersion="IFC4">
            <applicability>
                <attribute>
                    <name>
                        <simpleValue>GlobalId</simpleValue>
                    </name>
                </attribute>
            </applicability>
        </specification>
    </ns0:specifications>
</ns0:ids>

Then my point is, how to ask the model an applicability with attributes e.g : Any entity with an Attribute "*" ...

I am fairly new to IDS and searching for good documentation to try and write an IDS in the intended way, I don't know if this is the right place to ask this question. Thank you for your understanding and time.

andyward commented 1 month ago

I'd expect it to technically pass. Which software are you using?

The syntax looks correct. But I'm not sure it'll be checking what you are hoping for...

This specification is say "The model should have entities that have a populated GlobalId attribute". Given that IfcRoot.GlobalId is a required attribute, that will include any entity that is a sub-class of IfcRoot - so as well as all IfcObjects that will include IfcTypeObjects, IfcPropertySets, IfcMaterials, all the IfcRelations and a whole lot more...

I'd be very careful using just Attributes as an applicability selector (what would you expect AttributeName ="Description" to return? Will all implementations return the same?).

Until the standard supports entity sub-classes, (e.g. #86) you'd probably be better served with an enumeration restriction of the explicit entity types you're looking for - a bit like:

 <ids:specification ifcVersion="IFC2X3 IFC4" name="Walls are expected" minOccurs="1">
   <ids:applicability>
     <ids:entity>
       <ids:name>
         <xs:restriction base="xs:string">
           <xs:enumeration value="IFCWALL" />
           <xs:enumeration value="IFCWALLSTANDARDCASE" />
           <!-- etc -->
         </xs:restriction>
       </ids:name>
     </ids:entity>
   </ids:applicability>
 </ids:specification>
Enrra44 commented 1 month ago

I am using blenderBIM

I understand, what I find not clear is that in the end, the only facet which is used as an applicability is the entity facet. (Which makes sense considering the IFC schema) And I was trying to create the simplest of IDS to test the other facets in Applicability usage, it turns out I get Fail for attribute with GlobalId, and I think it is because you don't specify attribute of what entity.

In the end I think it would be useful to explain that in the documentation, because unless you find a utility to the other facets in applicability, it should be clear that they are used with requirement intent.

NickNisbet commented 1 month ago

It must be possible to use an attribute or property alone for applicability. e.g. Volume > 0.1 m3 e.g. FireRating e.g. (has) Tag but no Name e.g. (has) Classification but no ObjectType Entity Type is not always the best filter!

Nick N.

andyward commented 1 month ago

You should definitely be able to do what you're suggesting: use an Attribute Facet as the sole Applicability selector. It's legal IDS syntax. E.g as in the examples

I'd take the specific issue up with @Moult and the IfcOpenShell team- it's partly why I raised #181 as it's pretty clear there can be differences in the implementations of the applicability logic across implementors