#### IfcCurveDim

##### Semantic definitions at the function

Function Definition

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.

##### Formal representations

EXPRESS Specification

FUNCTION IfcCurveDim
(Curve : IfcCurve)
: IfcDimensionCount;
IF ('IFCGEOMETRYRESOURCE.IFCLINE' IN TYPEOF(Curve))
THEN RETURN(Curve\IfcLine.Pnt.Dim);
END_IF;
IF ('IFCGEOMETRYRESOURCE.IFCCONIC' IN TYPEOF(Curve))
THEN RETURN(Curve\IfcConic.Position.Dim);
END_IF;
IF ('IFCGEOMETRYRESOURCE.IFCPOLYLINE' IN TYPEOF(Curve))
THEN RETURN(Curve\IfcPolyline.Points[1].Dim);
END_IF;
IF ('IFCGEOMETRYRESOURCE.IFCTRIMMEDCURVE' IN TYPEOF(Curve))
THEN RETURN(IfcCurveDim(Curve\IfcTrimmedCurve.BasisCurve));
END_IF;
IF ('IFCGEOMETRYRESOURCE.IFCCOMPOSITECURVE' IN TYPEOF(Curve))
THEN RETURN(Curve\IfcCompositeCurve.Segments[1].Dim);
END_IF;
IF ('IFCGEOMETRYRESOURCE.IFCBSPLINECURVE' IN TYPEOF(Curve))
THEN RETURN(Curve\IfcBSplineCurve.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;

Link to this page