Navigation
Navigate Navigate Navigate Navigate

IfcCurveDim

Definition from IAI: This function checks the dimensionality of various subtypes of curve. It returns the dimensionality of the basic points and directions used at the instance of curve.

NOTE  The IFC model allows for mixed dimensionality within the same geometric representation context.  

HISTORY  New function in IFC Release 2x.

EXPRESS specification:

FUNCTION IfcCurveDim
(Curve : IfcCurve)
       : IfcDimensionCount;

  IF ('IFCGEOMETRYRESOURCE.IFCLINE' IN TYPEOF(Curve))
    THEN RETURN(Curve.Pnt.Dim);
  END_IF;
  IF ('IFCGEOMETRYRESOURCE.IFCCONIC' IN TYPEOF(Curve))
    THEN RETURN(Curve.Position.Dim);
  END_IF;
  IF ('IFCGEOMETRYRESOURCE.IFCPOLYLINE' IN TYPEOF(Curve))
    THEN RETURN(Curve.Points[1].Dim);
  END_IF;
  IF ('IFCGEOMETRYRESOURCE.IFCTRIMMEDCURVE' IN TYPEOF(Curve))
    THEN RETURN(IfcCurveDim(Curve.BasisCurve));
  END_IF;
  IF ('IFCGEOMETRYRESOURCE.IFCCOMPOSITECURVE' IN TYPEOF(Curve))
    THEN RETURN(Curve.Segments[1].Dim);
  END_IF;
  IF ('IFCGEOMETRYRESOURCE.IFCBSPLINECURVE' IN TYPEOF(Curve))
    THEN RETURN(Curve.ControlPointsList[1].Dim);
  END_IF;
  IF ('IFCGEOMETRYRESOURCE.IFCOFFSETCURVE2D' IN TYPEOF(Curve))
    THEN RETURN(2); 
  END_IF;
  IF ('IFCGEOMETRYRESOURCE.IFCOFFSETCURVE3D' IN TYPEOF(Curve))
    THEN RETURN(3);
  END_IF;
RETURN (?);
END_FUNCTION;