engine_web-ifc icon indicating copy to clipboard operation
engine_web-ifc copied to clipboard

GetLine doesn't support all entity types (only IFC4?)

Open andy-wrks opened this issue 3 years ago • 1 comments

Hi, thanks for the great work on webIFC!

We fail to retrieve the raw data for some entities via ifcAPI.GetLine(modelID, expressID). This happens for example with IfcElectricDistributionPoint entities. My base assumption is that webIFC applies the IFC4 scheme to all IFC files and so it's missing entities types that only exist in IFC2x3, like IfcElectricDistributionPoint.

The official scheme versions 2.3.0.1 and 4.0.2.1 have quite an overlap of common entities, but also a solid chunk of entities that are unique to each version. For what it's worth, here is the comparison: image

It appears like the 114 entity types that are unique to IFC2x3 might be unsupported. Since the attributes of an entity type can also change between versions, it would be best practice to process IFC files according to the used scheme version. Applying the same scheme to all files might produce some 2nd level effects like mismatching attributes etc.

I attached a sample file with two IfcElectricDistributionPoint instances and also a list of all entity types that are unique to IFC2x3.

Thanks for looking into it!

IFC2301_unique_entities.txt Sample_file.zip

andy-wrks avatar Aug 18 '22 15:08 andy-wrks

Here's an example of mismatching attribute names due to mismatching data schemes. In the classification concept, there's an attribute that holds the actual classification code (red in image):

image

This attribute changed its name from "ItemReference"(IFC2x3) to "Identification" (IFC4).

image

webIFC outputs "Identification" for both IFC2x3 and IFC4 files. Also note the other entries in the change log for this entity alone. IFC is complex and inconsistent already, so parsing a file against a mismatching data scheme will only create more problems. I hope this example helps to illustrate why webIFC should at least distinguish the 2 official scheme versions 2.3.0.1 and 4.0.2.1.

andy-wrks avatar Aug 23 '22 14:08 andy-wrks

::take

beachtom avatar Oct 27 '22 05:10 beachtom

🟢🟢🟢

::take

Hi, @beachtom! Thanks for taking this bounty! The due date is November 17, 2022 UTC.

If you need to submit some pull requests (PR) to complete the tasks, make sure that the last and only the last PR has a title that either starts with the bounty ID or is exactly the same as the bounty name. After the PR is merged, this bounty’s status will automatically changed to done.

If you do not need to make a PR, tell the manager @agviegas to run ::done command after your tasks is confirmed to be done.

Good luck!

agviegas avatar Oct 27 '22 05:10 agviegas

🔴🔴🔴

Hi, @beachtom! The date is past due, your assignment has been revoked. It’s now available for anyone to take.

agviegas avatar Nov 18 '22 00:11 agviegas

::take

beachtom avatar Nov 18 '22 08:11 beachtom

🟢🟢🟢

::take

Hi, @beachtom! Thanks for taking this bounty! The due date is December 9, 2022 UTC.

If you need to submit some pull requests (PR) to complete the tasks, make sure that the last and only the last PR has a title that either starts with the bounty ID or is exactly the same as the bounty name. After the PR is merged, this bounty’s status will automatically changed to done.

If you do not need to make a PR, tell the manager @agviegas to run ::done command after your tasks is confirmed to be done.

Good luck!

agviegas avatar Nov 18 '22 08:11 agviegas

@agviegas work is done just waiting for PR approval

beachtom avatar Nov 18 '22 08:11 beachtom

This is now done @agviegas

beachtom avatar Nov 24 '22 20:11 beachtom

::done

agviegas avatar Nov 27 '22 17:11 agviegas

🟢🟢🟢

::done

Hi, @beachtom! Thanks for your contributions! Please submit an expense to IFC.js Open Collective. Then, tell us the invoice number via the ::expense::_____ command (replace the _____ with the invoice number).

agviegas avatar Nov 27 '22 17:11 agviegas

Thanks @beachtom, looking forward to testing this one! This fix is quite substantial for all those who work from the raw data in IFC and need to acess all entities in a reliable way :-)

andy-wrks avatar Nov 28 '22 10:11 andy-wrks