Пример #1
0
        private void RunIO_Force(Point3D p)
        {
            var m = _wnTree._mesh;

            {
                var hole = MeshUtility.FindHole(m.Triangles);
                foreach (var item in hole)
                {
                    Line l = new Line(m.Vertices[item.V1], m.Vertices[item.V2]);
                    l.LineWeight       = 6;
                    l.LineWeightMethod = colorMethodType.byEntity;
                    eyeshot.Entities.Add(l, 0, Color.Crimson);
                }

                var tris = MeshUtility.TriangulateGreedy(hole, m);
                var rpd  = RPDFactory.Create(RPDFactory.RPDType.WindingNumber);
                rpd.Init(m);
                double prob  = (rpd as WindingNumberRPD).DetectProb(p);
                double prob2 = WindingNumberRPD.DetectProb(tris, p);

                DashBoard.Text += "\nWNa\t" + prob.ToString("F5");
                DashBoard.Text += "\nWNb\t" + prob2.ToString("F5");
                DashBoard.Text += "\nWNs\t" + (prob2 + prob).ToString("F5");
                //DashBoard.Text += "\nasin=" + Math.Asin(0.5).ToString("F5");
            }
        }