Beispiel #1
0
        /// 节点集输出至文件
        /// <summary>
        /// 节点集输出至文件
        /// </summary>
        /// <param name="Ps">节点集位置</param>
        /// <param name="Nums">节点集编号</param>
        /// <param name="Reverse_Check">是否倒序输出</param>
        /// <param name="Num_Pre">判断第一个节点是否输出的编号,相同则不输出</param>
        /// <param name="sw">输出对象</param>
        public static void Ns_Out(ref List <WPoint2D> Ps, ref List <int> Nums, bool Reverse_Check, int Num_Pre, ref StreamWriter sw)
        {
            int Quan = Ps.Count;

            if (Reverse_Check == false)
            {
                if (Nums[0] != Num_Pre)
                {
                    WMFuncs2D.N_Out(Ps[0], Nums[0], ref sw);
                }
                for (int i = 1; i < Quan; i++)
                {
                    WMFuncs2D.N_Out(Ps[i], Nums[i], ref sw);
                }
            }
            else
            {
                if (Nums[Quan - 1] != Num_Pre)
                {
                    WMFuncs2D.N_Out(Ps[Quan - 1], Nums[Quan - 1], ref sw);
                }
                for (int i = Quan - 2; i >= 0; i--)
                {
                    WMFuncs2D.N_Out(Ps[i], Nums[i], ref sw);
                }
            }
        }
Beispiel #2
0
 /// 节点集输出至文件,用在Glass上
 /// <summary>
 /// 节点集输出至文件,用在Glass上
 /// </summary>
 /// <param name="Ps">节点集位置</param>
 /// <param name="Nums">节点集编号</param>
 /// <param name="sw">输出对象</param>
 /// <param name="Mid_Check">判断中间的节点是否输出</param>
 /// <param name="HT_Check">判断两头的节点是否输出</param>
 /// <param name="Round">保留小数点数位</param>
 public static void Ns_Out(ref List <WPoint2D> Ps, ref List <int> Nums, ref StreamWriter sw, bool Mid_Check, bool HT_Check)
 {
     if (HT_Check == true)
     {
         WMFuncs2D.N_Out(Ps[0], Nums[0], ref sw);
     }
     if (Mid_Check == true)
     {
         for (int i = 1; i < Ps.Count - 1; i++)
         {
             WMFuncs2D.N_Out(Ps[i], Nums[i], ref sw);
         }
     }
     if (HT_Check == true)
     {
         WMFuncs2D.N_Out(Ps[Ps.Count - 1], Nums[Ps.Count - 1], ref sw);
     }
 }