/// <summary> /// Create an IFCCurve object from a handle of type IfcCurve. /// </summary> /// <param name="ifcCurve">The IFC handle.</param> /// <returns>The IFCCurve object.</returns> public static IFCCurve ProcessIFCCurve(IFCAnyHandle ifcCurve) { if (IFCAnyHandleUtil.IsNullOrHasNoValue(ifcCurve)) { Importer.TheLog.LogNullError(IFCEntityType.IfcCurve); return(null); } if (IFCAnyHandleUtil.IsSubTypeOf(ifcCurve, IFCEntityType.IfcBoundedCurve)) { return(IFCBoundedCurve.ProcessIFCBoundedCurve(ifcCurve)); } if (IFCAnyHandleUtil.IsSubTypeOf(ifcCurve, IFCEntityType.IfcConic)) { return(IFCConic.ProcessIFCConic(ifcCurve)); } if (IFCAnyHandleUtil.IsSubTypeOf(ifcCurve, IFCEntityType.IfcLine)) { return(IFCLine.ProcessIFCLine(ifcCurve)); } if (IFCAnyHandleUtil.IsSubTypeOf(ifcCurve, IFCEntityType.IfcOffsetCurve2D)) { return(IFCOffsetCurve2D.ProcessIFCOffsetCurve2D(ifcCurve)); } if (IFCAnyHandleUtil.IsSubTypeOf(ifcCurve, IFCEntityType.IfcOffsetCurve3D)) { return(IFCOffsetCurve3D.ProcessIFCOffsetCurve3D(ifcCurve)); } Importer.TheLog.LogUnhandledSubTypeError(ifcCurve, IFCEntityType.IfcCurve, true); return(null); }
/// <summary> /// Create an IFCLine object from a handle of type IfcLine /// </summary> /// <param name="ifcLine">The IFC handle</param> /// <returns>The IFCLine object</returns> public static IFCLine ProcessIFCLine(IFCAnyHandle ifcLine) { if (IFCAnyHandleUtil.IsNullOrHasNoValue(ifcLine)) { Importer.TheLog.LogNullError(IFCEntityType.IfcBSplineCurveWithKnots); return null; } IFCEntity line = null; if (!IFCImportFile.TheFile.EntityMap.TryGetValue(ifcLine.StepId, out line)) line = new IFCLine(ifcLine); return (line as IFCLine); }
/// <summary> /// Create an IFCLine object from a handle of type IfcLine /// </summary> /// <param name="ifcLine">The IFC handle</param> /// <returns>The IFCLine object</returns> public static IFCLine ProcessIFCLine(IFCAnyHandle ifcLine) { if (IFCAnyHandleUtil.IsNullOrHasNoValue(ifcLine)) { Importer.TheLog.LogNullError(IFCEntityType.IfcBSplineCurveWithKnots); return(null); } IFCEntity line = null; if (!IFCImportFile.TheFile.EntityMap.TryGetValue(ifcLine.StepId, out line)) { line = new IFCLine(ifcLine); } return(line as IFCLine); }