IfcCorrectFillAreaStyle

Natural language names
Correct Fill Area Style
Semantic definitions at the function
Function Definition

This function returns true if the different fill area styles are assigned correctly to the IfcFillAreaStyle. Only certain combinations of the entity types provided by the IfcFillStyleSelect are allowed.

Return false:

otherwise return true

HISTORY  New function in Release IFC2x3 TC1.

Formal representations
EXPRESS Specification

FUNCTION IfcCorrectFillAreaStyle
  (Styles : SET[1:?] OF IfcFillStyleSelect)
  :LOGICAL;

LOCAL
   Hatching : INTEGER := 0;
   Tiles    : INTEGER := 0;
   Colour   : INTEGER := 0;
   External : INTEGER := 0;
END_LOCAL;


External := SIZEOF(QUERY(Style <* Styles |
  'IFCPRESENTATIONAPPEARANCERESOURCE.IfcExternallyDefinedHatchStyle' IN
   TYPEOF(Style)));

Hatching  := SIZEOF(QUERY(Style <* Styles |
  'IFCPRESENTATIONAPPEARANCERESOURCE.IfcFillAreaStyleHatching' IN
   TYPEOF(Style)));

Tiles     := SIZEOF(QUERY(Style <* Styles |
  'IFCPRESENTATIONAPPEARANCERESOURCE.IfcFillAreaStyleTiles' IN
   TYPEOF(Style)));

Colour    := SIZEOF(QUERY(Style <* Styles |
  'IFCPRESENTATIONAPPEARANCERESOURCE.IfcColour' IN
   TYPEOF(Style)));


IF (External > 1) THEN
  RETURN (FALSE);
END_IF;


IF ((External = 1) AND ((Hatching > 0) OR (Tiles > 0) OR (Colour > 0))) THEN
  RETURN (FALSE);
END_IF;


IF (Colour > 1) THEN
  RETURN (FALSE);
END_IF;

IF ((Hatching > 0) AND (Tiles >0)) THEN
  RETURN (FALSE);
END_IF;

RETURN(TRUE);

END_FUNCTION;

References  References: IfcFillAreaStyle

Link to this page  Link to this page