函数定义
注:定义符合ISO/CD 10303-42:1992
此函数检查各种子类型曲线的维数。它返回曲线实例中使用的基本点和方向的维数。
注:本规范允许在相同的几何表示上下文中混合维度。
IFC2x中增加的新函数
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; IF ('IFCGEOMETRYRESOURCE.IFCPCURVE' IN TYPEOF(Curve)) THEN RETURN(3); END_IF; IF ('IFC4.IFCINDEXEDPOLYCURVE' IN TYPEOF(Curve)) THEN RETURN(Curve\IfcIndexedPolyCurve.Points.Dim); END_IF; RETURN (?); END_FUNCTION;