Representation items need to belong to a context, and often, more specifically, a subcontext. This means that each representation needs to have a ContextType (99% of the time is Model/Plan), ContextIdentifier (Body, Axis, etc) and TargetView (PLAN_VIEW, etc).
However, I have noticed many applications seemingly getting this wrong or storing things in inconsistent contexts. I believe this is because the documentation is not clear enough.
Here is some description which hopefully I think can clear it up when deciding which context to use. It might seem basic to some, but here is an example of a problem which has persisted for years.
- The first thing to determine is a ContextType (Model/Plan). You must always choose one of these two, unless youâre doing something special. Which you choose depends on the coordinate space dimension. If youâre doing 3D shapes, you use Model. If youâre doing 2D shapes, you use Plan. So you should never put a Curve3D in a Plan, and a Curve2D in a Model.
- Then, you choose a ContextIdentifier. Most of these people get correct, except for Annotation vs Footprint. If youâre using an annotation (e.g. dimension line, polygonal fill, etc), use Annotation. If youâre using a symbol (i.e. the 2D shape is symbolic and does not match the projection of the object, (e.g. emergency light symbols in reflected ceiling plans), then use Annotation as well. Only if youâre projecting the actual shape, and the object is something that âfills a boundaryâ, use a Footprint (e.g. slab outlines, building outlines, space outlines).
- Finally, choose a target view. Is it a line? Use a GRAPH_VIEW. Is it a 3D shape? Use MODEL_VIEW. Finally, if it is neither a line nor a 3D shape, it is a polygon. If it is not for viewing in a particular drawing type, use a SKETCH_VIEW, otherwise, use PLAN/RCP/SECTION/ELEVATION as necessary. If you are using a drawing type, consider TargetScale.
Things which are still ambiguous:
- I propose that Footprint geometry must only be valid in a Plan context.
4.8.2.5.1 FootPrint GeomSet Geometry
The âFootPrint GeomSet Geometryâ is the standard representation for the floor plan projection of the geometric representation of elements, comprising of mainly 2D curves
We may assume that Footprint is only valid in the Plan ContextType for 99% of cases (unless youâre doing something special).
- I propose that clarity is provided by the docs on annotation vs footprint.
Furniture should be annotation from my interpretation, as it is symbolic (i.e. a simplified representation of the full 3D object), and furniture (e.g. a chair) is not an element that âfills a boundaryâ.
Notice that this confusion arises when the docs never talk about how furniture symbols are used.
- Clarity should be provided on the ContextType for axis.
Reading of the docs suggest that wall Axis is Curve2D (assuming material layer set usage), so it should be in something like Plan/Axis/GRAPH_VIEW. However, a beam axis is Curve3D (assuming material profile alignment), so it should be in Model/Axis/GRAPH_VIEW. However, I have very rarely seen people actually implement this in two separate contexts.
- Clarity should be provided on when it is valid to forego a subcontext and assign directly to a context.
I have seen some IFCs do this - where no subcontexts exist at all, and everything is just assigned to a single Model context. What is the purpose of a context with no subcontext? Are we allowed to assign to it?
- Clarity should be provided on other lesser seen permutations of ContextType and ContextIdentifier and TargetView.
Is there such a thing as a Plan/Body/*? Is this more valid than Plan/Annotation/* for things like furniture symbols?
Is there such as thing as Plan/Profile/*? The docs only mention Curve3D.
Is there such a thing as Plan/Lighting/*?
What about target views. What target views are valid for Plan/Axis/*? Only GRAPH_VIEW? I assume so. What about SKETCH_VIEW? Can someone give an example of SKETCH_VIEW? I have no idea.
- Why is ContextType and ContextIdentifier optional? Under what circumstances is this acceptable?
I mention this because this is the Revit bug which was impacting users for a long time so we have a lot of files with this problem. What does it mean when these labels are missing?
To demonstrate that this is a problem, here is a case study for some of these issues of a simple door, wall, and slab exported from the certified Revit 2021 IFC export. Ping @angel.velez (the reason I pick Revit here is because it is the most prevalent in the industry - letâs get real) But also ping @jonm @claimred @stephen-l and other implementers who have to deal with this inconsistency.
Project1.ifc (87.6 KB)
Problems:
- Model/Footprint/MODEL_VIEW combo exists. It should not.
- Wall axis is Curve3D. It should be Curve2D according to the docs.
- Slab footprint is Curve2D, but belongs to Model. It should be Plan for the coordinate dimensionality to be correct, but there is no Plan context.
- Door has no annotations representations out of the box. What did I miss?
Can get get some clarity and consistency across implementations for this? Is my interpretation correct?