예제 #1
0
파일: IFCFace.cs 프로젝트: whztt07/RevitIFC
        /// <summary>
        /// Create geometry for a particular representation item.
        /// </summary>
        /// <param name="shapeEditScope">The geometry creation scope.</param>
        /// <param name="lcs">Local coordinate system for the geometry, without scale.</param>
        /// <param name="scaledLcs">Local coordinate system for the geometry, including scale, potentially non-uniform.</param>
        /// <param name="guid">The guid of an element for which represntation is being created.</param>
        protected override void CreateShapeInternal(IFCImportShapeEditScope shapeEditScope, Transform lcs, Transform scaledLcs, string guid)
        {
            base.CreateShapeInternal(shapeEditScope, lcs, scaledLcs, guid);

            shapeEditScope.StartCollectingFace(GetMaterialElementId(shapeEditScope));
            foreach (IFCFaceBound faceBound in Bounds)
            {
                faceBound.CreateShape(shapeEditScope, lcs, scaledLcs, guid);
                
                // If we can't create the outer face boundary, we will abort the creation of this face.  In that case, return.
                if (!shapeEditScope.HaveActiveFace())
                    return;
            }
            shapeEditScope.StopCollectingFace();
        }