Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem of understanding documentation regarding Facets. #271

Open
Enrra44 opened this issue Apr 8, 2024 · 4 comments
Open

Problem of understanding documentation regarding Facets. #271

Enrra44 opened this issue Apr 8, 2024 · 4 comments

Comments

@Enrra44
Copy link

Enrra44 commented Apr 8, 2024

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.

@Enrra44 Enrra44 closed this as completed Apr 8, 2024
@Enrra44 Enrra44 reopened this Apr 8, 2024
@andyward
Copy link
Contributor

andyward commented Apr 8, 2024

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
Copy link
Author

Enrra44 commented Apr 9, 2024

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
Copy link

NickNisbet commented Apr 9, 2024 via email

@andyward
Copy link
Contributor

andyward commented Apr 9, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants