コード例 #1
0
ファイル: IFCBoundedCurve.cs プロジェクト: masixian/revit-ifc
        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);
        }
コード例 #2
0
        public static IFCBoundedCurve ProcessIFCBoundedCurve(IFCAnyHandle ifcBoundedCurve)
        {
            if (IFCAnyHandleUtil.IsNullOrHasNoValue(ifcBoundedCurve))
            {
                Importer.TheLog.LogNullError(IFCEntityType.IfcBoundedCurve);
                return(null);
            }
            if (IFCAnyHandleUtil.IsSubTypeOf(ifcBoundedCurve, IFCEntityType.IfcBSplineCurve))
            {
                return(IFCBSplineCurve.ProcessIFCBSplineCurve(ifcBoundedCurve));
            }
            if (IFCAnyHandleUtil.IsSubTypeOf(ifcBoundedCurve, IFCEntityType.IfcCompositeCurve))
            {
                return(IFCCompositeCurve.ProcessIFCCompositeCurve(ifcBoundedCurve));
            }
            if (IFCAnyHandleUtil.IsSubTypeOf(ifcBoundedCurve, IFCEntityType.IfcPolyline))
            {
                return(IFCPolyline.ProcessIFCPolyline(ifcBoundedCurve));
            }
            if (IFCAnyHandleUtil.IsSubTypeOf(ifcBoundedCurve, IFCEntityType.IfcTrimmedCurve))
            {
                return(IFCTrimmedCurve.ProcessIFCTrimmedCurve(ifcBoundedCurve));
            }

            Importer.TheLog.LogUnhandledSubTypeError(ifcBoundedCurve, IFCEntityType.IfcBoundedCurve, true);
            return(null);
        }
コード例 #3
0
ファイル: IFCTrimmedCurve.cs プロジェクト: masixian/revit-ifc
        /// <summary>
        /// Create an IFCTrimmedCurve object from a handle of type IfcTrimmedCurve
        /// </summary>
        /// <param name="ifcTrimmedCurve">The IFC handle</param>
        /// <returns>The IFCTrimmedCurve object</returns>
        public static IFCTrimmedCurve ProcessIFCTrimmedCurve(IFCAnyHandle ifcTrimmedCurve)
        {
            if (IFCAnyHandleUtil.IsNullOrHasNoValue(ifcTrimmedCurve))
            {
                Importer.TheLog.LogNullError(IFCEntityType.IfcTrimmedCurve);
                return(null);
            }

            IFCEntity trimmedCurve = null;

            if (!IFCImportFile.TheFile.EntityMap.TryGetValue(ifcTrimmedCurve.StepId, out trimmedCurve))
            {
                trimmedCurve = new IFCTrimmedCurve(ifcTrimmedCurve);
            }

            return(trimmedCurve as IFCTrimmedCurve);
        }
コード例 #4
0
      /// <summary>
      /// Create an IFCTrimmedCurve object from a handle of type IfcTrimmedCurve
      /// </summary>
      /// <param name="ifcTrimmedCurve">The IFC handle</param>
      /// <returns>The IFCTrimmedCurve object</returns>
      public static IFCTrimmedCurve ProcessIFCTrimmedCurve(IFCAnyHandle ifcTrimmedCurve)
      {
         if (IFCAnyHandleUtil.IsNullOrHasNoValue(ifcTrimmedCurve))
         {
            Importer.TheLog.LogNullError(IFCEntityType.IfcTrimmedCurve);
            return null;
         }

         IFCEntity trimmedCurve = null;
         if (!IFCImportFile.TheFile.EntityMap.TryGetValue(ifcTrimmedCurve.StepId, out trimmedCurve))
            trimmedCurve = new IFCTrimmedCurve(ifcTrimmedCurve);

         return (trimmedCurve as IFCTrimmedCurve);
      }