IfcConsecutiveSegments

Natural language names
Consecutive Segments
Semantic definitions at the function
Function Definition

This function validates if a list of segment indices are connected to represent a concecutive curve. The last index of any, but the last, segment shall be identical with the first index of the next segment.

NOTE  If the last index of the last segment is identical with the first index of the first segment, the curve is closed.
HISTORY  New function in IFC4 ADD1

Formal representations
EXPRESS Specification

FUNCTION IfcConsecutiveSegments
  (Segments : LIST [1:?] OF IfcSegmentIndexSelect)
  : BOOLEAN;

LOCAL
  Result : BOOLEAN := TRUE;
END_LOCAL;

  REPEAT i := 1 TO (HIINDEX(Segments)-1);
    IF Segments[i][HIINDEX(Segments[i])] <> Segments[i+1][1] THEN
      BEGIN
        Result := FALSE;
        ESCAPE;
      END;
END_IF;
  END_REPEAT;

  RETURN (Result);
END_FUNCTION;

References  References: IfcIndexedPolyCurve

Link to this page  Link to this page