/// <summary>
        /// Create an IFCBSplineCurve object from the handle of type IfcBSplineCurve
        /// </summary>
        /// <param name="ifcBSplineCurve">The IFC handle</param>
        /// <returns>The IFCBSplineCurve object</returns>
        public static IFCBSplineCurve ProcessIFCBSplineCurve(IFCAnyHandle ifcBSplineCurve)
        {
            if (IFCAnyHandleUtil.IsNullOrHasNoValue(ifcBSplineCurve))
            {
                Importer.TheLog.LogNullError(IFCEntityType.IfcBSplineCurve);
                return(null);
            }

            if (IFCAnyHandleUtil.IsSubTypeOf(ifcBSplineCurve, IFCEntityType.IfcBSplineCurveWithKnots))
            {
                return(IFCBSplineCurveWithKnots.ProcessIFCBSplineCurveWithKnots(ifcBSplineCurve));
            }

            Importer.TheLog.LogUnhandledSubTypeError(ifcBSplineCurve, IFCEntityType.IfcBSplineCurve, true);
            return(null);
        }
Esempio n. 2
0
        /// <summary>
        /// Creates an IFCBSplineCurveWithKnots from a handle of type IfcBSplineCurveWithKnots
        /// </summary>
        /// <param name="ifcBSplineCurve">The handle</param>
        /// <returns>The IFCBSplineCurveWithKnots object</returns>
        public static IFCBSplineCurveWithKnots ProcessIFCBSplineCurveWithKnots(IFCAnyHandle ifcBSplineCurve)
        {
            if (IFCAnyHandleUtil.IsNullOrHasNoValue(ifcBSplineCurve))
            {
                Importer.TheLog.LogNullError(IFCEntityType.IfcBSplineCurveWithKnots);
                return(null);
            }

            IFCEntity bSplineCurve = null;

            if (!IFCImportFile.TheFile.EntityMap.TryGetValue(ifcBSplineCurve.StepId, out bSplineCurve))
            {
                bSplineCurve = new IFCBSplineCurveWithKnots(ifcBSplineCurve);
            }

            return(bSplineCurve as IFCBSplineCurveWithKnots);
        }