Set Geometric Representation Context
Overview
The specification of a project within IFC and every occurrence of a representation of a product (and specifically, its shape representation since this is currently the only type of representation defined with IFC) must have a context.
For a project, several contexts may be established which define global parameters that apply across the whole project. This includes the geometric representation context in conjunction with other values (see fp_set_project_context).
For a product, a geometric representation context is required that defines the context applying to the shape representations of that product. That is, it defines the type of the context in which the shape representation is defined, that can be used to describe the level of detailing for which the shape representation is valid and the numeric precision applicable to the geometric representation items defined in this context.
The geometric representation context establishes:
- the world coordinate system
- the coordinate space dimension
- the precision used within the geometric representations
- true north relative to the world coordinate system
- different types and scales that can be used for representing stored shapes (symbols) where these have multiple representations (e.g. multi-view blocks)
Results
Geometric representation context is established for the identified context type.
| Description | Entity/Pset/Functional Part | MAN | REC | OPT |
|---|---|---|---|---|
| Identify each context included.
Presently there are no recommendations on how the context should be identified or on values (or types of values) that should be assigned to a context identifier |
IfcGeometricRepresentationContext.ContextIdentifier | |||
| Identify the type of each context.
Type values should be agreed for implementation and use and might typically describe the type of view or the stages of a project. Current recommendations for values that might be assigned include:
|
IfcGeometricRepresentationContext.ContextType | |||
| Set the coordinate space dimension
This is the dimensionality in which geometric information within the project is to be defined. It must be an integer value of 2 or 3. Typically, for IFC information, this will take a value of 3 (for 3 dimensional representations). However, some contexts may have a value of 2 (for 2 dimensional representations). |
IfcGeometricRepresentationContext.CoordinateSpaceDimension | |||
| Define the world coordinate system for the project context.
This may be either a 2D coordinate system or a 3D coordinate system. Generally for IFC, a 3D coordinate system will be applied and this is assumed in the further guidance below. The world coordinate system is defined by its placement and axes as shown below. |
IfcGeometricRepresentationContext.WorldCoordinateSystem | |||
|
IfcAxis2Placement3D.Location IfcCartesianPoint.Coordinates::IfcLengthMeasure |
|||
|
IfcAxis2Placement3D.Dim | |||
|
IfcAxis2Placement3D.Axis IfcDirection.DirectionRatios |
|||
|
IfcAxis2Placement3D.RefDirection IfcDirection.DirectionRatios |
|||
|
IfcAxis2Placement3D.P | |||
| Define the precision of the representation.
This is the default precision that should be applied to the project or the precision of a particular context. It must be asserted when used in the project context but may be omitted in a shape representation context in which case, the precision of the project context is used as a default. |
IfcGeometricRepresentationContext.Precision | |||
| Set the direction of true north
This is the direction of the true north relative to the world coordinate system established by the representation context. It must be asserted when used in the project context but may be omitted in a shape representation context in which case, the direction of true north of the project context is used as a default. Note that the direction of true north is established using direction ratios in a similar manner to establishing the direction of the coordinate system axes. |
IfcGeometricRepresentationContext.TrueNorth IfcDirection.DirectionRatios |
IFC Entities Required
- IfcAxis2Placement2D
- IfcAxis2Placement3D
- IfcCartesianPoint
- IfcDirection
- IfcGeometricRepresentationContext
- IfcGeometricRepresentationItem
- IfcGeometricRepresentationSubContext
- IfcPlacement
- IfcPoint
- IfcRepresentationContext
IFC Datatypes Required
- IfcAxis2Placement
- IfcDimensionCount
- IfcGeometricProjectionEnum
- IfcLabel
- IfcLengthMeasure
- IfcPositiveRatioMeasure
- IfcRatioMeasure
IFC Functions Required
- IfcBuild2Axes
IDM Functional Parts Required
- -
EXPRESS-G
EXPRESS Schema
SCHEMA FP_SET_GEOMETRIC_REPRESENTATION_CONTEXT;
TYPE IfcDimensionCount = INTEGER;
WHERE
WR1 : { 0 < SELF <= 3 };
END_TYPE;
TYPE IfcLabel = STRING;
END_TYPE;
TYPE IfcLengthMeasure = REAL;
END_TYPE;
TYPE IfcRatioMeasure = REAL;
END_TYPE;
TYPE IfcPositiveRatioMeasure = IfcRatioMeasure;
WHERE
WR1 : SELF > 0;
END_TYPE;
TYPE IfcGeometricProjectionEnum = ENUMERATION OF
(GRAPH_VIEW,
SKETCH_VIEW,
MODEL_VIEW,
PLAN_VIEW,
REFLECTED_PLAN_VIEW,
SECTION_VIEW,
ELEVATION_VIEW,
USERDEFINED,
NOTDEFINED);
END_TYPE;
TYPE IfcAxis2Placement = SELECT
(IfcAxis2Placement2D,
IfcAxis2Placement3D);
END_TYPE;
ENTITY IfcAxis2Placement2D
SUBTYPE OF(IfcPlacement);
RefDirection : OPTIONAL IfcDirection;
DERIVE
p : LIST [2:2] OF IfcDirection := IfcBuild2Axes(RefDirection);
WHERE
WR1 : (NOT (EXISTS (RefDirection))) OR (RefDirection.Dim = 2);
WR2 : SELF\IfcPlacement.Location.Dim = 2;
END_ENTITY;
ENTITY IfcPlacement
ABSTRACT SUPERTYPE OF (ONEOF(IfcAxis2Placement2D, IfcAxis2Placement3D))
SUBTYPE OF(IfcGeometricRepresentationItem);
Location : IfcCartesianPoint;
DERIVE
Dim : IfcDimensionCount := Location.Dim;
END_ENTITY;
ENTITY IfcGeometricRepresentationItem
ABSTRACT SUPERTYPE OF (ONEOF(IfcDirection, IfcPlacement, IfcPoint))
SUBTYPE OF(IfcRepresentationItem);
END_ENTITY;
ENTITY IfcRepresentationItem
ABSTRACT SUPERTYPE;
END_ENTITY;
ENTITY IfcDirection
SUBTYPE OF(IfcGeometricRepresentationItem);
DirectionRatios : LIST [2:3] OF REAL;
DERIVE
Dim : IfcDimensionCount := HIINDEX(DirectionRatios);
END_ENTITY;
ENTITY IfcPoint
ABSTRACT SUPERTYPE
SUBTYPE OF(IfcGeometricRepresentationItem);
END_ENTITY;
ENTITY IfcCartesianPoint
SUBTYPE OF(IfcPoint);
Coordinates : LIST [1:3] OF IfcLengthMeasure;
DERIVE
Dim : IfcDimensionCount := HIINDEX(Coordinates);
WHERE
WR1 : HIINDEX(Coordinates) >= 2;
END_ENTITY;
ENTITY IfcAxis2Placement3D
SUBTYPE OF(IfcPlacement);
Axis : OPTIONAL IfcDirection;
RefDirection : OPTIONAL IfcDirection;
DERIVE
p : LIST [3:3] OF IfcDirection := IfcBuildAxes(Axis, RefDirection);
WHERE
WR1 : SELF\IfcPlacement.Location.Dim = 3;
WR2 : (NOT (EXISTS (Axis))) OR (Axis.Dim = 3);
WR3 : (NOT (EXISTS (RefDirection))) OR (RefDirection.Dim = 3);
WR4 : (NOT (EXISTS (Axis))) OR (NOT (EXISTS (RefDirection))) OR (IfcCrossProduct(Axis,RefDirection).Magnitude > 0.0);
WR5 : NOT ((EXISTS (Axis)) XOR (EXISTS (RefDirection)));
END_ENTITY;
ENTITY IfcRepresentationContext;
ContextIdentifier : OPTIONAL IfcLabel;
ContextType : OPTIONAL IfcLabel;
END_ENTITY;
ENTITY IfcGeometricRepresentationContext
SUBTYPE OF(IfcRepresentationContext);
CoordinateSpaceDimension : IfcDimensionCount;
Precision : OPTIONAL REAL;
WorldCoordinateSystem : IfcAxis2Placement;
TrueNorth : OPTIONAL IfcDirection;
END_ENTITY;
ENTITY IfcGeometricRepresentationSubContext
SUBTYPE OF(IfcGeometricRepresentationContext);
ParentContext : IfcGeometricRepresentationContext;
TargetScale : OPTIONAL IfcPositiveRatioMeasure;
TargetView : IfcGeometricProjectionEnum;
UserDefinedTargetView : OPTIONAL IfcLabel;
DERIVE
SELF\IfcGeometricRepresentationContext.WorldCoordinateSystem : IfcAxis2Placement := ParentContext.WorldCoordinateSystem;
SELF\IfcGeometricRepresentationContext.CoordinateSpaceDimension : IfcDimensionCount := ParentContext.CoordinateSpaceDimension;
SELF\IfcGeometricRepresentationContext.TrueNorth : IfcDirection := ParentContext.TrueNorth;
SELF\IfcGeometricRepresentationContext.Precision : REAL := ParentContext.Precision;
WHERE
WR31 : NOT('IFC2X2_FINAL.IFCGEOMETRICREPRESENTATIONSUBCONTEXT' IN TYPEOF(ParentContext));
WR32 : (TargetView <> IfcGeometricProjectionEnum.USERDEFINED) OR
((TargetView = IfcGeometricProjectionEnum.USERDEFINED) AND
EXISTS(UserDefinedTargetView));
END_ENTITY;
FUNCTION IfcBuild2Axes
(RefDirection : IfcDirection)
: LIST [2:2] OF IfcDirection;
LOCAL
D : IfcDirection := NVL(IfcNormalise(RefDirection),
IfcRepresentationItem() || IfcGeometricRepresentationItem () || IfcDirection([1.0,0.0]));
END_LOCAL;
RETURN([D, IfcOrthogonalComplement(D)]);
END_FUNCTION;
END_SCHEMA;