# 8.18.3.5 IfcGeometricRepresentationSubContext

## 8.18.3.5.1 Semantic definition

IfcGeometricRepresentationSubContext defines the context that applies to several shape representations of a product being a sub context, sharing the WorldCoordinateSystem, CoordinateSpaceDimension, Precision and TrueNorth attributes with the parent IfcGeometricRepresentationContext.

The IfcGeometricRepresentationSubContext is used to define semantically distinguished representation types for different information content, dependent on the representation view and the target scale. It can be used to control the level of detail of the shape representation that is most applicable to this geometric representation context. In addition the sub context is used to control the later appearance of the IfcShapeRepresentation within a plot view.

Each IfcProduct can then have several instances of subtypes of IfcRepresentation, each being assigned to a different IfcGeometricRepresentationSubContext). The applicable values for the inherited ContextIdentifier attribute shall be identical to the RepresentationIdentifier attribute defined at IfcShapeRepresentation.

## 8.18.3.5.5 Formal representation

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 := NVL(ParentContext.TrueNorth, IfcConvertDirectionInto2D(SELF\IfcGeometricRepresentationContext.WorldCoordinateSystem.P[2]));
SELF\IfcGeometricRepresentationContext.Precision : IfcReal := NVL(ParentContext.Precision,1.E-5);
WHERE
NoCoordOperation : SIZEOF(SELF\IfcGeometricRepresentationContext.HasCoordinateOperation) = 0;
ParentNoSub : NOT('IFC4X3_DEV_9f90c1f0.IFCGEOMETRICREPRESENTATIONSUBCONTEXT' IN TYPEOF(ParentContext));
UserTargetProvided :  (TargetView <> IfcGeometricProjectionEnum.USERDEFINED) OR
((TargetView =  IfcGeometricProjectionEnum.USERDEFINED) AND EXISTS(UserDefinedTargetView)) ;
END_ENTITY;