public static IFCBoundedCurve ProcessIFCBoundedCurve(IFCAnyHandle ifcBoundedCurve) { if (IFCAnyHandleUtil.IsNullOrHasNoValue(ifcBoundedCurve)) { Importer.TheLog.LogNullError(IFCEntityType.IfcBoundedCurve); return(null); } if (IFCImportFile.TheFile.SchemaVersionAtLeast(IFCSchemaVersion.IFC2x2) && IFCAnyHandleUtil.IsValidSubTypeOf(ifcBoundedCurve, IFCEntityType.IfcBSplineCurve)) { return(IFCBSplineCurve.ProcessIFCBSplineCurve(ifcBoundedCurve)); } if (IFCAnyHandleUtil.IsValidSubTypeOf(ifcBoundedCurve, IFCEntityType.IfcCompositeCurve)) { return(IFCCompositeCurve.ProcessIFCCompositeCurve(ifcBoundedCurve)); } if (IFCAnyHandleUtil.IsValidSubTypeOf(ifcBoundedCurve, IFCEntityType.IfcPolyline)) { return(IFCPolyline.ProcessIFCPolyline(ifcBoundedCurve)); } if (IFCAnyHandleUtil.IsValidSubTypeOf(ifcBoundedCurve, IFCEntityType.IfcTrimmedCurve)) { return(IFCTrimmedCurve.ProcessIFCTrimmedCurve(ifcBoundedCurve)); } if (IFCImportFile.TheFile.SchemaVersionAtLeast(IFCSchemaVersion.IFC4Obsolete) && IFCAnyHandleUtil.IsValidSubTypeOf(ifcBoundedCurve, IFCEntityType.IfcIndexedPolyCurve)) { return(IFCIndexedPolyCurve.ProcessIFCIndexedPolyCurve(ifcBoundedCurve)); } Importer.TheLog.LogUnhandledSubTypeError(ifcBoundedCurve, IFCEntityType.IfcBoundedCurve, true); return(null); }
/// <summary> /// Create an IFCIndexedPolyCurve object from a handle of type IfcIndexedPolyCurve /// </summary> /// <param name="ifcIndexedPolyCurve">The IFC handle</param> /// <returns>The IFCIndexedPolyCurve object</returns> public static IFCIndexedPolyCurve ProcessIFCIndexedPolyCurve(IFCAnyHandle ifcIndexedPolyCurve) { if (IFCAnyHandleUtil.IsNullOrHasNoValue(ifcIndexedPolyCurve)) { Importer.TheLog.LogNullError(IFCEntityType.IfcIndexedPolyCurve); return(null); } IFCEntity indexedPolyCurve = null; if (!IFCImportFile.TheFile.EntityMap.TryGetValue(ifcIndexedPolyCurve.StepId, out indexedPolyCurve)) { indexedPolyCurve = new IFCIndexedPolyCurve(ifcIndexedPolyCurve); } return(indexedPolyCurve as IFCIndexedPolyCurve); }