Esempio n. 1
0
        /// <summary>
        /// Process IfcTriangulatedFaceSet instance
        /// </summary>
        /// <param name="ifcTriangulatedFaceSet">the handle</param>
        protected override void Process(IFCAnyHandle ifcTriangulatedFaceSet)
        {
            base.Process(ifcTriangulatedFaceSet);

            // Process the IFCCartesianPointLIst3D
            IFCAnyHandle coordinates = IFCImportHandleUtil.GetRequiredInstanceAttribute(ifcTriangulatedFaceSet, "Coordinates", true);

            if (IFCAnyHandleUtil.IsSubTypeOf(coordinates, IFCEntityType.IfcCartesianPointList3D))
            {
                IFCCartesianPointList3D coordList = IFCCartesianPointList3D.processIFCCartesianPointList3D(coordinates);
                if (coordList != null)
                {
                    Coordinates = coordList;
                }
            }

            IList <IList <double> > normals = IFCImportHandleUtil.GetListOfListOfDoubleAttribute(ifcTriangulatedFaceSet, "Normals");

            if (normals != null)
            {
                if (normals.Count > 0)
                {
                    Normals = normals;
                }
            }

            bool?closed = IFCAnyHandleUtil.GetBooleanAttribute(ifcTriangulatedFaceSet, "Closed");

            if (closed != null)
            {
                Closed = closed;
            }

            IList <IList <int> > coordIndex = IFCImportHandleUtil.GetListOfListOfIntegerAttribute(ifcTriangulatedFaceSet, "CoordIndex");

            if (coordIndex != null)
            {
                if (coordIndex.Count > 0)
                {
                    CoordIndex = coordIndex;
                }
            }

            IList <IList <int> > normalIndex = IFCImportHandleUtil.GetListOfListOfIntegerAttribute(ifcTriangulatedFaceSet, "NormalIndex");

            if (normalIndex != null)
            {
                if (normalIndex.Count > 0)
                {
                    NormalIndex = normalIndex;
                }
            }
        }
        /// <summary>
        /// Accept the handle for IFCCartesianPointList3D and return the instance (creating it if not yet created)
        /// </summary>
        /// <param name="ifcCartesianPointList3D">The handle.</param>
        /// <returns>The associated IFCCartesianPointList3D class.</returns>
        public static IFCCartesianPointList3D processIFCCartesianPointList3D(IFCAnyHandle ifcCartesianPointList3D)
        {
            if (IFCAnyHandleUtil.IsNullOrHasNoValue(ifcCartesianPointList3D))
            {
                Importer.TheLog.LogNullError(IFCEntityType.IfcCartesianPointList3D);
                return null;
            }

            IFCEntity cartesianPointList3D;
            if (!IFCImportFile.TheFile.EntityMap.TryGetValue(ifcCartesianPointList3D.StepId, out cartesianPointList3D))
                cartesianPointList3D = new IFCCartesianPointList3D(ifcCartesianPointList3D);
            return (cartesianPointList3D as IFCCartesianPointList3D);
        }
        /// <summary>
        /// Process IfcTriangulatedFaceSet instance
        /// </summary>
        /// <param name="ifcTessellatedFaceSet">the handle</param>
        protected override void Process(IFCAnyHandle ifcTessellatedFaceSet)
        {
            base.Process(ifcTessellatedFaceSet);

            // Process the IFCCartesianPointLIst3D
            IFCAnyHandle coordinates = IFCImportHandleUtil.GetRequiredInstanceAttribute(ifcTessellatedFaceSet, "Coordinates", true);

            if (IFCAnyHandleUtil.IsSubTypeOf(coordinates, IFCEntityType.IfcCartesianPointList3D))
            {
                IFCCartesianPointList3D coordList = IFCCartesianPointList3D.processIFCCartesianPointList3D(coordinates);
                if (coordList != null)
                {
                    Coordinates = coordList;
                }
            }
        }
Esempio n. 4
0
        /// <summary>
        /// Accept the handle for IFCCartesianPointList3D and return the instance (creating it if not yet created)
        /// </summary>
        /// <param name="ifcCartesianPointList3D">The handle.</param>
        /// <returns>The associated IFCCartesianPointList3D class.</returns>
        public static IFCCartesianPointList3D processIFCCartesianPointList3D(IFCAnyHandle ifcCartesianPointList3D)
        {
            if (IFCAnyHandleUtil.IsNullOrHasNoValue(ifcCartesianPointList3D))
            {
                Importer.TheLog.LogNullError(IFCEntityType.IfcCartesianPointList3D);
                return(null);
            }

            IFCEntity cartesianPointList3D;

            if (!IFCImportFile.TheFile.EntityMap.TryGetValue(ifcCartesianPointList3D.StepId, out cartesianPointList3D))
            {
                cartesianPointList3D = new IFCCartesianPointList3D(ifcCartesianPointList3D);
            }
            return(cartesianPointList3D as IFCCartesianPointList3D);
        }