/// <summary>
        /// 添加平曲线断链
        /// </summary>
        /// <param name="B">断链</param>
        public void AddHB(BrokenChainage B)
        {
            int n = GetIndexByB(B);

            if (n == -1)  //在里程外不添加
            {
                return;
            }
            bC.Add(B);
            if ((int)B.type == 0 || (int)B.type == 1)   //长链或短链
            {
                double[] k1 = new double[4];
                double[] k2 = new double[4];
                k1[0] = K[n][0];
                k1[1] = B.beforeK;
                k1[2] = K[n][2];
                k1[3] = B.beforeK - K[n][0] + K[n][2];
                k2[0] = B.afterK;
                k2[1] = K[n][1];
                k2[2] = k1[3];
                k2[3] = K[n][3];
                K.RemoveAt(n);
                K.Insert(n, k2);
                K.Insert(n, k1);
            }
            else        //其他类型不改变里程
            {
                return;
            }
        }
        /// <summary>
        /// 添加竖曲线断链
        /// </summary>
        /// <param name="B">断链</param>
        public void AddVB(BrokenChainage B)
        {
            if (K[K.Count - 1][0] == K[K.Count - 1][1])
            {
                K.RemoveAt(K.Count - 1);   //移除曲线长为0的线元(通常为最后一项)
            }
            int n = GetIndexByB(B);

            if (n == -1)  //在里程外不添加
            {
                return;
            }
            bC.Add(B);
            if ((int)B.type == 0 || (int)B.type == 1)   //长链或短链
            {
                double[] k1 = new double[4];
                double[] k2 = new double[4];
                k1[0] = K[n][0];
                k1[1] = B.beforeK;
                k1[2] = K[n][0];
                k1[3] = B.beforeK;
                k2[0] = B.afterK;
                k2[1] = K[n][1];
                k2[2] = B.afterK;
                k2[3] = K[n][1];
                K.RemoveAt(n);
                K.Insert(n, k2);
                K.Insert(n, k1);
            }
            else        //其他断链类型不改变里程
            {
                return;
            }
            ContinueFlush();    //更新连续里程
        }
 /// <summary>
 /// 得到断链所在的里程序号
 /// </summary>
 /// <param name="B">断链</param>
 /// <returns></returns>
 private int GetIndexByB(BrokenChainage B)
 {
     for (int i = 0; i < K.Count; i++)
     {
         if (B.beforeK > K[i][0] && B.beforeK <K[i][1] && B.afterK> K[i][0] && B.afterK < K[i][1])
         {
             return(i);
         }
     }
     return(-1);
 }