FUNCTION IfcShapeRepresentationTypes

(* SCHEMA IFC4; *)
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 | ('IFC4.IFCPOINT' IN TYPEOF(temp))
                 OR ('IFC4.IFCCARTESIANPOINTLIST' IN TYPEOF(temp))));
      END;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

END_FUNCTION;

Referenced By

Defintion IfcShapeRepresentationTypes is references by the following definitions:
DefinitionType
 IfcShapeRepresentation ENTITY


[Top Level Definitions] [Exit]

Generated by STEP Tools® EXPRESS to HTML Converter
2024-07-11T21:39:05-04:00