Ejemplo n.º 1
0
        //for debugging it is handy to bypass the exploration to establish the internal model...just set it
        public void SetModel()
        {
            MainWindow.SuspendEngine();
            Initialize();
            Module2DModel nmModel = (Module2DModel)FindModuleByType(typeof(Module2DModel));

            if (nmModel == null)
            {
                return;
            }
            //clear out any existing
            nmModel.Initialize();

            for (int i = 0; i < objects.Count; i++)
            {
                PointPlus P1 = new PointPlus()
                {
                    P = objects[i].P1
                };
                PointPlus P2 = new PointPlus()
                {
                    P = objects[i].P2
                };
                int theColor = Utils.ColorToInt(objects[i].theColor);
                nmModel.AddSegmentFromVision(P1, P2, theColor, false);
            }
            MainWindow.ResumeEngine();
        }