Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Create an IFCPolyline object from a handle of type IfcPolyline
        /// </summary>
        /// <param name="ifcPolyline">The IFC handle</param>
        /// <returns>The IFCPolyline object</returns>
        public static IFCPolyline ProcessIFCPolyline(IFCAnyHandle ifcPolyline)
        {
            if (IFCAnyHandleUtil.IsNullOrHasNoValue(ifcPolyline))
            {
                Importer.TheLog.LogNullError(IFCEntityType.IfcPolyline);
                return(null);
            }

            IFCEntity polyline = null;

            if (!IFCImportFile.TheFile.EntityMap.TryGetValue(ifcPolyline.StepId, out polyline))
            {
                polyline = new IFCPolyline(ifcPolyline);
            }

            return(polyline as IFCPolyline);
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Create an IFCPolyline object from a handle of type IfcPolyline
        /// </summary>
        /// <param name="ifcPolyline">The IFC handle</param>
        /// <returns>The IFCPolyline object</returns>
        public static IFCPolyline ProcessIFCPolyline(IFCAnyHandle ifcPolyline)
        {
            if (IFCAnyHandleUtil.IsNullOrHasNoValue(ifcPolyline))
            {
                Importer.TheLog.LogNullError(IFCEntityType.IfcPolyline);
                return null;
            }

            IFCEntity polyline = null;
            if (!IFCImportFile.TheFile.EntityMap.TryGetValue(ifcPolyline.StepId, out polyline))
                polyline = new IFCPolyline(ifcPolyline);

            return (polyline as IFCPolyline);
        }