public void CollisionTest() { _powerMILL.LoadProject(TestFiles.BoundaryTypes); PMBoundary boundary = _powerMILL.ActiveProject.Boundaries[5]; Assert.IsNotNull(boundary as PMBoundaryCollisionSafe); }
public void ShallowTest() { _powerMILL.LoadProject(TestFiles.BoundaryTypes); PMBoundary boundary = _powerMILL.ActiveProject.Boundaries[3]; Assert.IsNotNull(boundary as PMBoundaryShallow); }
public void SilhouetteTest() { _powerMILL.LoadProject(TestFiles.BoundaryTypes); PMBoundary boundary = _powerMILL.ActiveProject.Boundaries[4]; Assert.IsNotNull(boundary as PMBoundarySilhouette); }
public void RestTest() { _powerMILL.LoadProject(TestFiles.BoundaryTypes); PMBoundary boundary = _powerMILL.ActiveProject.Boundaries[1]; Assert.IsNotNull(boundary as PMBoundaryRest); }
public void SelectedSurfaceTest() { _powerMILL.LoadProject(TestFiles.BoundaryTypes); PMBoundary boundary = _powerMILL.ActiveProject.Boundaries[2]; Assert.IsNotNull(boundary as PMBoundarySelectedSurface); }
public void ToSplinesTest() { PMBoundary boundary = _powerMILL.ActiveProject.Boundaries.CreateBoundary(TestFiles.CurvesFiles); var splines = boundary.ToSplines(); Assert.AreEqual(2, splines.Count); }
public void UserDefinedTest() { _powerMILL.LoadProject(TestFiles.BoundaryTypes); PMBoundary boundary = _powerMILL.ActiveProject.Boundaries[10]; Assert.IsNotNull(boundary as PMBoundaryUserDefined); }
public void BooleanOperationTest() { _powerMILL.LoadProject(TestFiles.BoundaryTypes); PMBoundary boundary = _powerMILL.ActiveProject.Boundaries[9]; Assert.IsNotNull(boundary as PMBoundaryBooleanOperation); }
public void ContactConversionTest() { _powerMILL.LoadProject(TestFiles.BoundaryTypes); PMBoundary boundary = _powerMILL.ActiveProject.Boundaries[8]; Assert.IsNotNull(boundary as PMBoundaryContactConversion); }
public void InsertBoundaryByNameTest() { PMBoundary bToInsert = _powerMILL.ActiveProject.Boundaries.CreateBoundary(TestFiles.CurvesFiles); PMBoundary bEmpty = _powerMILL.ActiveProject.Boundaries.CreateEmptyBoundary(); bEmpty.InsertBoundaryByName(bToInsert.Name); Assert.IsTrue(bEmpty.BoundingBox != null); }
public void CreateFromPolyLine() { PMBoundary boundary = _powerMILL.ActiveProject.Boundaries.CreateBoundary(TestFiles.CurvesFiles); var polyline = boundary.ToPolylines().First(); PMBoundary newBoundary = _powerMILL.ActiveProject.Boundaries.CreateBoundary(polyline); Assert.NotNull(newBoundary); }
public void CreateBlockFromBoundaryWithLimitsTest() { _powerMILL.ActiveProject.Boundaries.CreateBoundary(TestFiles.CurvesFiles); _powerMILL.ActiveProject.Refresh(); PMBoundary boundary = _powerMILL.ActiveProject.Boundaries.ActiveItem; var boundingBox = _powerMILL.ActiveProject.CreateBlockFromBoundaryWithLimits(boundary, 0, 100); Assert.That(boundingBox.MaxZ.Value, Is.EqualTo(100)); }
public void FlatTest() { PMBoundary boundary = _powerMILL.ActiveProject.Boundaries.CreateBoundary(TestFiles.SihouetteFile); Assert.IsTrue(boundary.BoundingBox.ZSize != 0, "Border cannot be flat."); boundary.Flat(); Assert.IsTrue(boundary.BoundingBox.ZSize == 0, "Border must be flat."); }
public void WriteToFileTest() { PMBoundary boundary = _powerMILL.ActiveProject.Boundaries.CreateBoundary(TestFiles.CurvesFiles); var testFile = FileSystem.File.CreateTemporaryFile("pic"); boundary.WriteToFile(testFile); bool fileExists = testFile.Exists; testFile.Delete(); Assert.AreEqual(true, fileExists); }
public void CreateBlockFromBoundaryTest() { _powerMILL.LoadProject(TestFiles.SimplePmProject1); _powerMILL.ActiveProject.Boundaries.CreateBoundary(TestFiles.CurvesFiles); _powerMILL.ActiveProject.Refresh(); PMBoundary boundary = _powerMILL.ActiveProject.Boundaries.ActiveItem; var boundingBox = _powerMILL.ActiveProject.CreateBlockFromBoundary(boundary); Assert.That(boundingBox.MaxZ, Is.EqualTo((Autodesk.Geometry.MM) 53.353777)); Assert.That(boundingBox.MinZ, Is.EqualTo((Autodesk.Geometry.MM)(-30.004846))); }
public void ExportBlockTest() { _powerMILL.ActiveProject.Boundaries.CreateBoundary(TestFiles.CurvesFiles); _powerMILL.ActiveProject.Refresh(); PMBoundary boundary = _powerMILL.ActiveProject.Boundaries.ActiveItem; var boundingBox = _powerMILL.ActiveProject.CreateBlockFromBoundaryWithLimits(boundary, 0, 100); FileSystem.File file = FileSystem.File.CreateTemporaryFile("dmt", false); _powerMILL.ActiveProject.ExportBlock(file); Assert.That(file.Exists); file.Delete(); file = FileSystem.File.CreateTemporaryFile("stl", false); _powerMILL.ActiveProject.ExportBlock(file); Assert.That(file.Exists); file.Delete(); }