Esempio n. 1
0
        public void Convert(string inputRootDir, string outputFolder)
        {
            var singleModel = new SingleModel(inputRootDir);

            CreateOutputRoot(inputRootDir, outputFolder, singleModel);
            ConvertSingleModel(singleModel);
        }
Esempio n. 2
0
        private void ConvertSingleModel(SingleModel singleModel)
        {
            Log.Info(singleModel.Info.Caption + " conversion started!");
            var layerConverter = new LayerConverter(outputRootDir);

            foreach (ModelLayerInfo layerInfo in singleModel.Info.Layers)
            {
                layerConverter.Convert(layerInfo);
            }
        }
Esempio n. 3
0
 private void CreateOutputRoot(string inputRootDir, string outputFolder, SingleModel singleModel)
 {
     outputRootDir = outputFolder + @"\" + Path.GetFileName(inputRootDir);
     Directory.CreateDirectory(outputRootDir);
     File.Copy(inputRootDir + @"\ModelInfo.json", outputRootDir + @"\ModelInfo.json", true);
     if (singleModel.Info.IconFileName != null)
     {
         File.Copy(inputRootDir + @"\" + singleModel.Info.IconFileName,
                   outputRootDir + @"\" + singleModel.Info.IconFileName, true);
     }
 }