Revit.SDK.Samples.CurtainWallGrid.CS.GridDrawing.GetConjointSegments C# (CSharp) Method

GetConjointSegments() public method

check whether the segments which have the same junction with the specified segment will be isolated if we delete the specified segment for example: 2 grid line has one junction, so there'll be 4 segments connecting to this junction let's delete 2 segments out of the 4 first, then if we want to delete the 3rd segment, the 4th segment will be a "isolated" one, so we will pick this kind of segment out
public GetConjointSegments ( SegmentLine2D segLine, List removeSegments ) : void
segLine SegmentLine2D /// the specified segment used to checking ///
removeSegments List /// the result seg list (all the segments in this list is to-be-deleted) ///
return void
        public void GetConjointSegments(SegmentLine2D segLine,
          List<SegmentLine2D> removeSegments)
        {
            System.Drawing.Point startPoint = segLine.StartPoint;
             System.Drawing.Point endPoint = segLine.EndPoint;

             // get the "isolated" segment in the location of start point
             SegmentLine2D startRemoveSegLine = new SegmentLine2D();
             GetConjointSegment(startPoint, segLine.IsUSegment, ref startRemoveSegLine);
             // get the "isolated" segment in the location of end point
             SegmentLine2D endRemoveSegLine = new SegmentLine2D();
             GetConjointSegment(endPoint, segLine.IsUSegment, ref endRemoveSegLine);

             if (null != startRemoveSegLine)
             {
            removeSegments.Add(startRemoveSegLine);
             }
             if (null != endRemoveSegLine)
             {
            removeSegments.Add(endRemoveSegLine);
             }
        }