buildingSMART / buildingSMART/NextGen-IFC

Utilize a concept such as Generics.

Open
#14 11 comments 4 reactions 0 assignees View on GitHub
enhancement Governance
Dominant language
TeX
Stars
64
Forks
4
PR merge metrics
No merged PRs in 30d

Description

It seems that popular programming languages provide the mechanism to use generics.

https://en.wikipedia.org/wiki/Generic_programming

Lots of leaf classes inheriting from IfcTypeObject and IfcObject only add a single attribute PredefinedType. Here’s an example of IfcAirTerminalType showing many layers with no attributes.

![191118 type attribute inheritance](https://user-images.githubusercontent.com/791757/75876976-c998cc80-5e6a-11ea-9c0a-9f56497f40cc.png)

Some details still need to be thought through, but potentially we could terminate the derived classes at IfcObjectType by taking advantage of the concept of generics. The PredefinedType attribute could be stored at the tier of IfcObject and IfcTypeObject, saving on a lot of children attributes.

A related refactor would be the direct reference of the relating type to the instance.

![191118 instance type generics](https://user-images.githubusercontent.com/791757/75877058-f220c680-5e6a-11ea-8acf-df785e9d9f7d.png)

This can reduce the number of official classes and attributes significantly in the schema, allowing "Late Binding" of classification.

Contributor guide

No contributing guide indexed for this repository

Research direction

No files, tests, or entry points are identified. Start by reviewing the IfcObject/IfcTypeObject inheritance example and the IfcAirTerminalType diagram, then establish the generic representation and direct instance-to-type reference proposed in the issue. Done requires an agreed design that reduces redundant classes and attributes without losing predefined-type or classification behavior.

Written by the indexing model from the issue text.

Assessment

Domain
backend-api-design, data
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.