Navigation

IfcCurveDim

EXPRESS specification:

FUNCTION IfcCurveDim
(Curve : IfcCurve)
         : IfcDimensionCount;
LOCAL
  TempDim  : IfcDimensionCount := 3;
END_LOCAL;
  IF ('IFCGEOMETRYRESOURCE.IFCLINE' IN TYPEOF(Curve))
    THEN TempDim := Curve.Pnt.Dim;
    ELSE
    IF ('IFCGEOMETRYRESOURCE.IFCCONIC' IN TYPEOF(Curve))
      THEN TempDim := Curve.Position.Dim;
      ELSE
      IF ('IFCGEOMETRYRESOURCE.IFCPOLYLINE' IN TYPEOF(Curve))
        THEN TempDim := Curve.Points[1].Dim;
        ELSE
        IF ('IFCGEOMETRYRESOURCE.IFCTRIMMEDCURVE' IN TYPEOF(Curve))
          THEN TempDim := IfcCurveDim(Curve.BasisCurve);
          ELSE
          IF ('IFCGEOMETRYRESOURCE.IFCCOMPOSITECURVE' IN TYPEOF(Curve))
            THEN TempDim := Curve.Segments[1].Dim;
            ELSE
            IF ('IFCGEOMETRYRESOURCE.IFCOFFSETCURVE2D' IN TYPEOF(Curve))
              THEN TempDim := 2; 
              ELSE
              IF ('IFCGEOMETRYRESOURCE.IFCOFFSETCURVE3D' IN TYPEOF(Curve))
                THEN TempDim := 3;
                ELSE TempDim := ?;
              END_IF;
            END_IF;
          END_IF;
        END_IF;
      END_IF;
    END_IF;
  END_IF;
RETURN (TempDim);
END_FUNCTION;