IFC 4.3.0.1 (IFC4X3) development

8.18.6.3 IfcShapeRepresentationTypes

8.18.6.3.1 Semantic definition

The function gets the representation type and the assigned set of representation items as input and verifies whether the correct items are assigned according to the representation type given.

8.18.6.3.2 Formal representation

FUNCTION IfcShapeRepresentationTypes
(RepType : IfcLabel; Items : SET OF IfcRepresentationItem) : LOGICAL;
    
    LOCAL
      Count : INTEGER := 0;
    END_LOCAL;

    CASE RepType OF 
    'Point' :
      BEGIN 
        Count := SIZEOF(QUERY(temp <* Items | ('IFC4X3_DEV_8c7a5e51.IFCPOINT' IN TYPEOF(temp))));
      END;

    'PointCloud' :
      BEGIN 
        Count := SIZEOF(QUERY(temp <* Items | ('IFC4X3_DEV_8c7a5e51.IFCCARTESIANPOINTLIST3D' IN TYPEOF(temp))));
      END;

    'Curve' :
      BEGIN 
        Count := SIZEOF(QUERY(temp <* Items | ('IFC4X3_DEV_8c7a5e51.IFCCURVE' IN TYPEOF(temp))));
      END;

    'Curve2D' :
      BEGIN 
        Count := SIZEOF(QUERY(temp <* Items | ('IFC4X3_DEV_8c7a5e51.IFCCURVE' IN TYPEOF(temp)) 
                 AND (temp\IfcCurve.Dim = 2)));
      END;

    'Curve3D' :
      BEGIN 
        Count := SIZEOF(QUERY(temp <* Items | ('IFC4X3_DEV_8c7a5e51.IFCCURVE' IN TYPEOF(temp)) 
                 AND (temp\IfcCurve.Dim = 3)));
      END;

    'Segment' :
      BEGIN 
        Count := SIZEOF(QUERY(temp <* Items | ('IFC4X3_DEV_8c7a5e51.IFCSEGMENT' IN TYPEOF(temp))));
      END;

    'Surface' :
      BEGIN 
        Count := SIZEOF(QUERY(temp <* Items | ('IFC4X3_DEV_8c7a5e51.IFCSURFACE' IN TYPEOF(temp))));
      END;

    'Surface2D' :
      BEGIN 
        Count := SIZEOF(QUERY(temp <* Items | ('IFC4X3_DEV_8c7a5e51.IFCSURFACE' IN TYPEOF(temp)) 
                 AND (temp\IfcSurface.Dim = 2)));
      END;

    'Surface3D' :
      BEGIN 
        Count := SIZEOF(QUERY(temp <* Items | ('IFC4X3_DEV_8c7a5e51.IFCSURFACE' IN TYPEOF(temp)) 
                 AND (temp\IfcSurface.Dim = 3)));
      END;

    'SectionedSurface' :
      BEGIN 
        Count := SIZEOF(QUERY(temp <* Items | 'IFC4X3_DEV_8c7a5e51.IFCSECTIONEDSURFACE' IN TYPEOF(temp)));
      END;

    'FillArea' :
      BEGIN 
        Count := SIZEOF(QUERY(temp <* Items | ('IFC4X3_DEV_8c7a5e51.IFCANNOTATIONFILLAREA' IN TYPEOF(temp))));
      END;

    'Text' :
      BEGIN 
        Count := SIZEOF(QUERY(temp <* Items | ('IFC4X3_DEV_8c7a5e51.IFCTEXTLITERAL' IN TYPEOF(temp))));
      END;

    'AdvancedSurface' :
      BEGIN 
        Count := SIZEOF(QUERY(temp <* Items | 'IFC4X3_DEV_8c7a5e51.IFCBSPLINESURFACE' IN TYPEOF(temp)));
      END;

    'Annotation2D' :
      BEGIN
        Count := SIZEOF(QUERY(temp <* Items | (
                  SIZEOF(TYPEOF(temp) * [
                   'IFC4X3_DEV_8c7a5e51.IFCPOINT',
                   'IFC4X3_DEV_8c7a5e51.IFCCURVE',
                   'IFC4X3_DEV_8c7a5e51.IFCGEOMETRICCURVESET',
                   'IFC4X3_DEV_8c7a5e51.IFCANNOTATIONFILLAREA',
                   'IFC4X3_DEV_8c7a5e51.IFCTEXTLITERAL']) = 1)
                 ));
      END;

    'GeometricSet' : 
      BEGIN 
        Count := SIZEOF(QUERY(temp <* Items | ('IFC4X3_DEV_8c7a5e51.IFCGEOMETRICSET' IN TYPEOF(temp))
                 OR ('IFC4X3_DEV_8c7a5e51.IFCPOINT' IN TYPEOF(temp))
                 OR ('IFC4X3_DEV_8c7a5e51.IFCCURVE' IN TYPEOF(temp))
                 OR ('IFC4X3_DEV_8c7a5e51.IFCSURFACE' IN TYPEOF(temp))));
      END;

    'GeometricCurveSet' :
      BEGIN
        Count := SIZEOF(QUERY(temp <* Items | ('IFC4X3_DEV_8c7a5e51.IFCGEOMETRICCURVESET' IN TYPEOF(temp))
                 OR ('IFC4X3_DEV_8c7a5e51.IFCGEOMETRICSET' IN TYPEOF(temp))
                 OR ('IFC4X3_DEV_8c7a5e51.IFCPOINT' IN TYPEOF(temp))
                 OR ('IFC4X3_DEV_8c7a5e51.IFCCURVE' IN TYPEOF(temp))));
         REPEAT i:=1 TO HIINDEX(Items);  
           IF ('IFC4X3_DEV_8c7a5e51.IFCGEOMETRICSET' IN TYPEOF(Items[i]))
           THEN
             IF (SIZEOF(QUERY(temp <* Items[i]\IfcGeometricSet.Elements | 'IFC4X3_DEV_8c7a5e51.IFCSURFACE' IN TYPEOF(temp))) > 0)
             THEN
               Count := Count - 1;
             END_IF;
           END_IF;
         END_REPEAT;
      END;

    'Tessellation' :
      BEGIN 
        Count := SIZEOF(QUERY(temp <* Items | 'IFC4X3_DEV_8c7a5e51.IFCTESSELLATEDITEM' IN TYPEOF(temp)));
      END;

    'SurfaceOrSolidModel' :
      BEGIN
        Count := SIZEOF(QUERY(temp <* Items | SIZEOF([
                   'IFC4X3_DEV_8c7a5e51.IFCTESSELLATEDITEM',
                   'IFC4X3_DEV_8c7a5e51.IFCSHELLBASEDSURFACEMODEL',
                   'IFC4X3_DEV_8c7a5e51.IFCFACEBASEDSURFACEMODEL',
                   'IFC4X3_DEV_8c7a5e51.IFCSOLIDMODEL'] * TYPEOF(temp)) >= 1
                 ));      
      END;

    'SurfaceModel' :
      BEGIN
        Count := SIZEOF(QUERY(temp <* Items | SIZEOF([
                   'IFC4X3_DEV_8c7a5e51.IFCTESSELLATEDITEM',
                   'IFC4X3_DEV_8c7a5e51.IFCSHELLBASEDSURFACEMODEL',
                   'IFC4X3_DEV_8c7a5e51.IFCFACEBASEDSURFACEMODEL'] * TYPEOF(temp)) >= 1
                 ));      
      END;

    'SolidModel' :
      BEGIN
        Count := SIZEOF(QUERY(temp <* Items | ('IFC4X3_DEV_8c7a5e51.IFCSOLIDMODEL' IN TYPEOF(temp))));            
      END;

    'SweptSolid' :
      BEGIN
        Count := SIZEOF(QUERY(temp <* Items | (SIZEOF([
                   'IFC4X3_DEV_8c7a5e51.IFCEXTRUDEDAREASOLID',
                   'IFC4X3_DEV_8c7a5e51.IFCREVOLVEDAREASOLID'] * TYPEOF(temp)) >= 1
                   ) AND (SIZEOF([
                   'IFC4X3_DEV_8c7a5e51.IFCEXTRUDEDAREASOLIDTAPERED',
                   'IFC4X3_DEV_8c7a5e51.IFCREVOLVEDAREASOLIDTAPERED'] * TYPEOF(temp)) = 0
                   )
                 ));                             
      END;

    'AdvancedSweptSolid' :
      BEGIN
        Count := SIZEOF(QUERY(temp <* Items | SIZEOF([
                   'IFC4X3_DEV_8c7a5e51.IFCSWEPTAREASOLID',
                   'IFC4X3_DEV_8c7a5e51.IFCSWEPTDISKSOLID',
                   'IFC4X3_DEV_8c7a5e51.IFCSECTIONEDSOLIDHORIZONTAL'] *  TYPEOF(temp)) >= 1
                 ));      
      END;

    'CSG' :
      BEGIN
        Count := SIZEOF(QUERY(temp <* Items | SIZEOF([
                   'IFC4X3_DEV_8c7a5e51.IFCBOOLEANRESULT',
                   'IFC4X3_DEV_8c7a5e51.IFCCSGPRIMITIVE3D',
                   'IFC4X3_DEV_8c7a5e51.IFCCSGSOLID'] *  TYPEOF(temp)) >= 1
                 ));            
      END;

    'Clipping' :
      BEGIN
        Count := SIZEOF(QUERY(temp <* Items | SIZEOF([
                   'IFC4X3_DEV_8c7a5e51.IFCCSGSOLID',
                   'IFC4X3_DEV_8c7a5e51.IFCBOOLEANCLIPPINGRESULT'] * TYPEOF(temp)) >= 1
                 )); 
      END;

    'Brep' :
      BEGIN
        Count := SIZEOF(QUERY(temp <* Items | ('IFC4X3_DEV_8c7a5e51.IFCFACETEDBREP' IN TYPEOF(temp))));      
      END;

    'AdvancedBrep' :
      BEGIN
        Count := SIZEOF(QUERY(temp <* Items | ('IFC4X3_DEV_8c7a5e51.IFCMANIFOLDSOLIDBREP' IN TYPEOF(temp))));      
      END;

    'BoundingBox' :
      BEGIN
        Count := SIZEOF(QUERY(temp <* Items | ('IFC4X3_DEV_8c7a5e51.IFCBOUNDINGBOX' IN TYPEOF(temp))));
        IF (SIZEOF(Items) > 1)
        THEN
          Count := 0;
        END_IF;   
      END;

    'SectionedSpine' :
      BEGIN
        Count := SIZEOF(QUERY(temp <* Items | ('IFC4X3_DEV_8c7a5e51.IFCSECTIONEDSPINE' IN TYPEOF(temp))));      
      END;

    'LightSource' :
      BEGIN
        Count := SIZEOF(QUERY(temp <* Items | ('IFC4X3_DEV_8c7a5e51.IFCLIGHTSOURCE' IN TYPEOF(temp))));      
      END;

    'MappedRepresentation' :
      BEGIN
        Count := SIZEOF(QUERY(temp <* Items | ('IFC4X3_DEV_8c7a5e51.IFCMAPPEDITEM' IN TYPEOF(temp))));  
      END;

     OTHERWISE : RETURN(?);
    END_CASE;
    RETURN (Count = SIZEOF(Items));

END_FUNCTION;

8.18.6.3.3 References

Edit on Github


Is this page difficult to understand? Let us know!