Skip to content

Reconsidering the ability to allow class inheritance #356

@Moult

Description

@Moult

I know this has been decided before, but the more I use IDS, but more I find it quite silly when people ask me "how do I write a requirement for all physical elements", the answer is: "copy paste from this big list of elements which only I have generated, and I've generated three variants of that list for IFC2X3, IFC4, and IFC4X3".

(and yes, people still copy paste wrongly)

And then when somebody reads the IDS, they see a massive list of objects and their eyes tend to glaze over.

In contrast, with inheritance and exclusion facets, I can express this in IfcOpenShell as simply as:

  • IfcElement, ! IfcFeatureElement meaning all physical elements, minus openings and protrusions
  • IfcDistributionControlElement meaning all the control elements in distribution system (no boring things like pipes and ducts and trays)
  • IfcSpatialStructureElement, ! IfcSpace meaning stuff like sites, buildings, storeys (big things) except for individual spaces

It's simple, readable (to me at least), and works across schema versions.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Todo

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions