Exemple #1
0
        private static List <Algo> InitializeAlgosAndWorkspaces()
        {
            string SCRIPTS_PATH = ".\\Scripts";
            var    helperFiles  = new Dictionary <string, string>();

            foreach (var item in Directory.GetFiles(SCRIPTS_PATH))
            {
                //pattern matches filename with extension from path string
                var match = Regex.Match(item, @"\w+\.\w+$");
                if (match.Success)
                {
                    //pattern matches name without extension from ilename with extension string
                    helperFiles.Add(match.Value, item);
                }
            }
            scripts = helperFiles;

            MeshlabWorkspace meshlabWorkspace = new MeshlabWorkspace("meshlab");
            BlenderWorkspace blenderWorkspace = new BlenderWorkspace("blender");
            PerlWorkspace    perlWorkspace    = new PerlWorkspace("perl");

            //other workspaces
            Workspace qslimWorkspace       = new Workspace("qslim");
            Workspace openFlipperWorkspace = new Workspace("openflipper");
            Workspace myQemWorkspace       = new Workspace("myqem");
            Workspace foglemanWorkSpace    = new Workspace("foglemanqem");
            Workspace cgalWorkspace        = new Workspace("cgal");
            Workspace pmWorkspace          = new Workspace("pm");

            List <Algo> allAlgos = new List <Algo>();

            //meshlab qem
            allAlgos.Add(new MeshLabQem(new Algo.AlgoOptions(
                                            meshlabWorkspace,
                                            "MeshlabQem"
                                            )));

            //fogleman
            allAlgos.Add(new FoglemanQem(new Algo.AlgoOptions(
                                             foglemanWorkSpace,
                                             "Fogleman"
                                             )));

            //my qem
            allAlgos.Add(new MyQem(new Algo.AlgoOptions(
                                       myQemWorkspace,
                                       "MyQem"
                                       )));

            //open flipper
            var ofo = new OpenFlipper.OpenFlipperOptions
            {
                order = 0,
                type  = 0
            };

            allAlgos.Add(new OpenFlipper(new Algo.AlgoOptions(
                                             openFlipperWorkspace,
                                             "OpenFlipperDist"
                                             ), ofo));

            //blender
            allAlgos.Add(new Blender(new Algo.AlgoOptions(
                                         blenderWorkspace,
                                         "Blender"
                                         )));

            //new OpenFlipper(new Algo.AlgoOptions{path = OPEN_FLIPPER_PATH, color= "green", mark ="*", name = "OpenFlipperNormal"}, new OpenFlipper.OpenFlipperOptions{order = 1, type = 0}),
            //new OpenFlipper(new Algo.AlgoOptions{path = OPEN_FLIPPER_PATH, color= "black", mark ="x", name = "OpenFlipperEdge"}, new OpenFlipper.OpenFlipperOptions{order = 2, type = 0}),

            //qslim
            allAlgos.Add(new QSlim(new Algo.AlgoOptions(
                                       qslimWorkspace,
                                       "QSlim"
                                       )));

            allAlgos.Add(new SimplifyCGAL(new Algo.AlgoOptions(
                                              cgalWorkspace,
                                              "SimplifyCGAL"
                                              )));

            allAlgos.Add(new ProgressiveMeshes(new Algo.AlgoOptions(
                                                   pmWorkspace,
                                                   "PM"
                                                   )));

            return(allAlgos);
        }
Exemple #2
0
 public Blender(AlgoOptions algoOptions) : base(algoOptions)
 {
     blenderWorkspace = (BlenderWorkspace)algoOptions.workspace;
 }