예제 #1
0
        public SolutionWindow(Data.Solution solution)
        {
            InitializeComponent();

            model_ = new Model(solution);

            DataContext = model_;
        }
예제 #2
0
        /// <summary>
        /// Initializes a new instance Model class.
        /// </summary>
        /// <param name="solution">The Solution.</param>
        public Model(Data.Solution solution)
        {
            Solution = solution;

            TaskList          = Lists.CreateTasks();
            PlatformList      = Lists.CreatePlatforms();
            ConfigurationList = Lists.CreateConfigurations();
            ConditionList     = Lists.CreateConditions();
        }
예제 #3
0
        private void OnBuildExecute(Data.Solution solution)
        {
            Build.Processed = Build.Processed + 1;

            window_.Dispatcher.Invoke(DispatcherPriority.Normal, new Action(() =>
            {
                selectedSolution_            = solution;
                selectedSolution_.IsSelected = true;
                window_.listBoxSolutions.ScrollIntoView(selectedSolution_);
            }));
        }
예제 #4
0
        public void saveOBJ(Data.Solution solution, Data.Setting setting, string path)
        {
            ObjWriter      objWriter   = new ObjWriter(path + "//result.obj");
            List <Point3D> listPoint3D = new List <Point3D>();

            for (int x = 0; x < solution.sharpImage.Width; x++)
            {
                for (int y = 0; y < solution.sharpImage.Height; y++)
                {
                    if (solution.getValue(x, y) != -1)
                    {
                        listPoint3D.Add(
                            new Point3D(x / (double)solution.Width * setting.FWIDTH,
                                        y / (double)solution.Height * setting.FWIDTH,
                                        solution.getValue(x, y) * setting.HCOEFF));
                    }
                }
            }
            objWriter.addPoints(listPoint3D);
        }
예제 #5
0
 public void savePNG(Data.Solution solution, string path)
 {
     solution.sharpImage.Save(path + "//sharpImage.png", System.Drawing.Imaging.ImageFormat.Png);
 }
예제 #6
0
 public Algorithm()
 {
     solution = new Data.Solution();
     rectangles = new List<taio.Data.Rectangle>();
 }
예제 #7
0
 public test(Data.Solution s)
 {
     this.s = s;
 }