예제 #1
0
        public void Export_Obj_FilesExist()
        {
            var tempFile = Path.GetTempFileName();
            var tempObj  = Path.ChangeExtension(tempFile, "obj");
            var tempMtl  = Path.ChangeExtension(tempFile, "mtl");

            try
            {
                CrossThreadTestRunner.RunInSTAThrowException(() =>
                {
                    var view = new Viewport3D();
                    view.Export(tempObj);
                });

                FileAssert.Exists(tempObj);
                FileAssert.Exists(tempMtl);
            }
            finally
            {
                File.Delete(tempFile);

                if (File.Exists(tempObj))
                {
                    File.Delete(tempObj);
                }

                if (File.Exists(tempMtl))
                {
                    File.Delete(tempMtl);
                }
            }
        }
예제 #2
0
파일: Helix.cs 프로젝트: vimaec/ara3d-dev
 public static void Export(Viewport3D view, string fileName, Brush background = null)
 => view.Export(ValidateExportExtension(fileName), background);