IFC 4.3.0.0 (IFC4X3) final

8.12.6.1 IfcCorrectFillAreaStyle

8.12.6.1.1 Semantic 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:

  • if more then one externally defined style is assigned
  • if an externally defined style is given and any other internal style definition is attached additionally
  • if more then one background colour is assigned
  • if both, a hatching and a tiling is assigned

otherwise return true

8.12.6.1.2 Formal representation

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 |
  'IFC4X3.IFCEXTERNALLYDEFINEDHATCHSTYLE' IN
   TYPEOF(Style)));

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

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

Colour    := SIZEOF(QUERY(Style <* Styles |
  'IFC4X3.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;

8.12.6.1.3 References