示例#1
0
        void ReadEdgeFile()
        {
            string[] all = File.ReadAllLines(edgeFile);
            int[] arr = ReadIntLine(GetFirstLine(all));

            foreach (var line in GetRemainingLine(all))
            {
                arr = ReadIntLine(line);
                TetEdge edge = new TetEdge();
                edge.Vertices.Add(mesh.Vertices[arr[1]]);
                edge.Vertices.Add(mesh.Vertices[arr[2]]);
                edge.Vertices.TrimExcess();
                edge.Index = mesh.Edges.Count;
                edge.B = arr[3] == 1;
                mesh.Edges.Add(edge);
            }
        }
示例#2
0
        void ReadEdgeFile()
        {
            string[] all = File.ReadAllLines(edgeFile);
            int[]    arr = ReadIntLine(GetFirstLine(all));

            foreach (var line in GetRemainingLine(all))
            {
                arr = ReadIntLine(line);
                TetEdge edge = new TetEdge();
                edge.Vertices.Add(mesh.Vertices[arr[1]]);
                edge.Vertices.Add(mesh.Vertices[arr[2]]);
                edge.Vertices.TrimExcess();
                edge.Index = mesh.Edges.Count;
                edge.B     = arr[3] == 1;
                mesh.Edges.Add(edge);
            }
        }
示例#3
0
        void RefreshEdge()
        {
            TetMesh mesh = GlobalData.Instance.TetMesh;

            this.onLoad = true;
            this.edgeView.Rows.Clear();
            this.edgeView.Rows.Add(mesh.Edges.Count);
            for (int i = 0; i < mesh.Edges.Count; i++)
            {
                TetEdge         e   = mesh.Edges[i];
                DataGridViewRow row = this.edgeView.Rows[i];
                row.Cells["EIndex"].Value    = e.Index;
                row.Cells["EFlag"].Value     = e.Flag;
                row.Cells["EBoundary"].Value = e.OnBoundary;

                row.Cells["EV0"].Value = e.Vertices[0].Index;
                row.Cells["EV1"].Value = e.Vertices[1].Index;
            }
            this.onLoad = false;
        }