Example #1
0
        private static bool Triangulate_Refine(string File_Name, Mesh_Para MP)
        {
            bool Out = false;

            mesh      = new Mesh();
            input     = FileReader.ReadPolyFile(File_Name);
            MP.QN_Ini = input.Count;

            if (MP.MinAngle_Tri > 0 && MP.MinAngle_Tri < 180)
            {
                mesh.Behavior.MinAngle = MP.MinAngle_Tri;
            }
            try
            {
                mesh.Triangulate(input);
                Out = true;
            }
            catch (System.Exception ex) { }

            if (Out == false)
            {
                return(Out);
            }
            else
            {
                Out = Refine(MP.MaxArea_Tri, MP.MaxAngle_Tri, MP.MinAngle_Tri);
            }

            return(Out);
        }
Example #2
0
 public static void Combine(ref Node[] Ns, ref Element[] Es, ref Mesh_Para MP)
 {
     Elements_Combine(ref Ns, ref Es, MP.MaxAngle_Qua);
     Output(MP.Path, MP.Name, ref Ns, ref Es);
 }