private void FillUpHole(Mesh m, List <int>[] maps, List <FloatDouble> upContourPrcessed, Box3Float boxU) { Transform(upContourPrcessed, boxU.GetCenter().X, boxU.GetCenter().Y); List <Triangle> up = new List <Triangle>(); PolyTriangulator.Process(upContourPrcessed, up); if (!IsNormalZ2(upContourPrcessed, up)) { ReverseNormal(up); } for (int i = 0; i < up.Count; i++) { Triangle t = up[i]; t.P0Index = maps[lines.Count - 1][t.P0Index]; t.P1Index = maps[lines.Count - 1][t.P1Index]; t.P2Index = maps[lines.Count - 1][t.P2Index]; m.AddFace(t); } }
private void FillDownHole(Mesh m, List <int>[] maps, List <FloatDouble> downContourPrcessed, Box3Float boxD) { Transform(downContourPrcessed, boxD.GetCenter().X, boxD.GetCenter().Y); List <Triangle> down = new List <Triangle>(); PolyTriangulator.Process(downContourPrcessed, down); if (IsNormalZ2(downContourPrcessed, down)) { ReverseNormal(down); } for (int i = 0; i < down.Count; i++) { Triangle t = down[i]; t.P0Index = maps[0][t.P0Index]; t.P1Index = maps[0][t.P1Index]; t.P2Index = maps[0][t.P2Index]; m.AddFace(t); } }