Autodesk / revit-ifc

IFC for Revit and Navisworks (2019+)
485 stars 196 forks source link

Export 2d plan view elements creates an invalid geometric representation context #187

Open Moult opened 4 years ago

Moult commented 4 years ago

If the option is enabled, the following syntax is created:

#108= IFCGEOMETRICREPRESENTATIONCONTEXT($,'Annotation',3,0.01,#96,#97);
#109= IFCGEOMETRICREPRESENTATIONSUBCONTEXT($,'Annotation',*,*,*,*,#108,0.01,.PLAN_VIEW.,$);

This is invalid. From the docs:

NOTE The inherited attribute ContextType shall have one of the following recognized values: 'Model', 'Plan', 'NotDefined'.

AngelVelezSosa commented 4 years ago

That's correct. Exporting 2d plan view elements is strictly speaking not supported in CV2.0 - it was in CV. That option allows you to do "extra", which is why it isn't enabled by default.

Moult commented 4 years ago

@AngelVelezSosa I'm not talking about whether it that option is enabled or not. What I'm saying is that when it is enabled, it produced invalid IFC syntax. The docs require "Model" or "Plan" for ContextType, but the produced IFC does not follow that. What should happen is that Annotation is created as a subcontext under a Plan context.

AngelVelezSosa commented 4 years ago

I was trying to look up the docs for CV and CV2.0- where are you looking?

Moult commented 4 years ago

For IFC2X3

https://standards.buildingsmart.org/IFC/RELEASE/IFC2x3/TC1/HTML/ifcrepresentationresource/lexical/ifcgeometricrepresentationcontext.htm

For IFC4 and onwards

https://standards.buildingsmart.org/IFC/RELEASE/IFC4/FINAL/HTML/link/ifcgeometricrepresentationcontext.htm

Both have the same restriction of Model or Plan or NotDefined.

Moult commented 4 years ago

@AngelVelezSosa can you confirm this issue?

Moult commented 4 years ago

Bump.

AngelVelezSosa commented 4 years ago

Yup, easy fix. Will do. "Plan" context, "Annotation" subcontext.