Пример #1
0
 private void AddFaceToTessellatedShapeBuilder(TessellatedFace theFace)
 {
     TessellatedShapeBuilder.AddFace(theFace);
     TessellatedFaceBoundary.Clear();
     FaceMaterialId = ElementId.InvalidElementId;
     CreatedFacesCount++;
 }
        /// <summary>
        /// Start collecting edges for a face to create a BRep solid.
        /// </summary>
        /// <param name="materialId">The material id of the face.</param>
        /// <param name="canTriangulate">Whether we can delay processing bad boundary data.</param>
        public void StartCollectingFace(ElementId materialId, bool canTriangulate)
        {
            if (TessellatedShapeBuilder == null)
            {
                throw new InvalidOperationException("StartCollectingFaceSet has not been called.");
            }

            if (TessellatedFaceBoundary == null)
            {
                TessellatedFaceBoundary = new List <IList <XYZ> >();
            }
            else
            {
                TessellatedFaceBoundary.Clear();
            }

            if (TessellatedFaceVertices == null)
            {
                TessellatedFaceVertices = new IFCFuzzyXYZSet(GetVertexTolerance());
            }

            DelayedFaceBoundary           = null;
            CanProcessDelayedFaceBoundary = canTriangulate;
            FaceMaterialId = materialId;
        }
Пример #3
0
        /// <summary>
        /// Remove the current invalid face from the list of faces to create a BRep solid.
        /// </summary>
        override public void AbortCurrentFace()
        {
            if (TessellatedFaceBoundary != null)
            {
                TessellatedFaceBoundary.Clear();
            }

            FaceMaterialId = ElementId.InvalidElementId;
        }
 private void AddFaceToTessellatedShapeBuilder(TessellatedFace theFace, bool extraFace)
 {
     TessellatedShapeBuilder.AddFace(theFace);
     TessellatedFaceBoundary.Clear();
     FaceMaterialId = ElementId.InvalidElementId;
     if (extraFace)
     {
         ExtraCreatedFacesCount++;
     }
     else
     {
         CreatedFacesCount++;
     }
 }
Пример #5
0
        /// <summary>
        /// Stop collecting faces to create a BRep solid.
        /// </summary>
        public void StopCollectingFaceSet()
        {
            if (TessellatedShapeBuilder == null)
            {
                throw new InvalidOperationException("StartCollectingFaceSet has not been called.");
            }

            TessellatedShapeBuilder.CloseConnectedFaceSet();

            if (TessellatedFaceBoundary != null)
            {
                TessellatedFaceBoundary.Clear();
            }

            if (TessellatedFaceVertices != null)
            {
                TessellatedFaceVertices.Clear();
            }

            FaceMaterialId = ElementId.InvalidElementId;
        }
Пример #6
0
        /// <summary>
        /// Start collecting faces to create a BRep solid.
        /// </summary>
        public void StartCollectingFaceSet()
        {
            if (TessellatedShapeBuilder == null)
            {
                TessellatedShapeBuilder = new TessellatedShapeBuilder();
            }

            TessellatedShapeBuilder.OpenConnectedFaceSet(false);
            ResetCreatedFacesCount();

            if (TessellatedFaceVertices != null)
            {
                TessellatedFaceVertices.Clear();
            }

            if (TessellatedFaceBoundary != null)
            {
                TessellatedFaceBoundary.Clear();
            }

            FaceMaterialId = ElementId.InvalidElementId;
        }