示例#1
0
        public void ToSplinesTest()
        {
            PMPattern pattern = _powerMILL.ActiveProject.Patterns.CreatePattern(TestFiles.CurvesFiles);
            var       splines = pattern.ToSplines();

            Assert.AreEqual(2, splines.Count);
        }
示例#2
0
        public void CreatePatternFromSpline()
        {
            PMPattern comparisonPattern = _powerMILL.ActiveProject.Patterns.CreatePattern(TestFiles.CurvesFiles);
            var       spline            = comparisonPattern.ToSplines().First();

            PMPattern outputPattern = _powerMILL.ActiveProject.Patterns.CreatePattern(spline);
            var       outSplines    = outputPattern.ToSplines();

            Assert.AreEqual(1, outSplines.Count);
            Assert.AreEqual(230, outSplines.First().Count);
        }
示例#3
0
        public void WriteToFileTest()
        {
            PMPattern pattern  = _powerMILL.ActiveProject.Patterns.CreatePattern(TestFiles.CurvesFiles);
            var       testFile = FileSystem.File.CreateTemporaryFile("pic");

            pattern.WriteToFile(testFile);
            bool fileExists = testFile.Exists;

            testFile.Delete();
            Assert.AreEqual(true, fileExists);
        }