public void OpenCurveByCurves_ValidArgs() { // construct a unit rectangle var pts1 = new[] { Point.ByCoordinates(0,0,0), Point.ByCoordinates(0.4,0,0), Point.ByCoordinates(0.8,0,0), Point.ByCoordinates(1,0,0), }; var pts2 = new[] { Point.ByCoordinates(1,0,0), Point.ByCoordinates(1,0.4,0), Point.ByCoordinates(1,0.8,0), Point.ByCoordinates(1,1,0) }; var crvs = new[] { NurbsCurve.ByPoints(pts1), NurbsCurve.ByPoints(pts2) }; // construct the curveloop var curveloop = CurveLoop.ByCurves(crvs); Assert.NotNull(curveloop); Assert.IsTrue(curveloop.IsPlanar); Assert.IsFalse(curveloop.IsClosed); }
public void ByViewPointsAndVectorValues_ValidArgs() { var samplePoints = new[] { Point.ByCoordinates(0, 2, 4), Point.ByCoordinates(0, 7, 4), Point.ByCoordinates(0, 19, 4) }; var sampleValues = new[] { Vector.ByCoordinates(0, 2, 4), Vector.ByCoordinates(0, 7, 4), Vector.ByCoordinates(0, 19, 4) }; var doc = Document.Current; var grid = VectorAnalysisDisplay.ByViewPointsAndVectorValues(doc.ActiveView, samplePoints, sampleValues); Assert.NotNull(grid); }
public void ByViewPointsAndValues_BadArgs() { var samplePoints = new[] { Point.ByCoordinates(0, 2, 4), Point.ByCoordinates(0, 7, 4), Point.ByCoordinates(0, 19, 4) }; var sampleValues = new[] { 1.0, 1092, -1 }; var doc = Document.Current; Assert.Throws(typeof(System.ArgumentNullException), () => PointAnalysisDisplay.ByViewPointsAndValues(null, samplePoints, sampleValues)); Assert.Throws(typeof(System.ArgumentNullException), () => PointAnalysisDisplay.ByViewPointsAndValues(doc.ActiveView, null, sampleValues)); Assert.Throws(typeof(System.ArgumentNullException), () => PointAnalysisDisplay.ByViewPointsAndValues(doc.ActiveView, samplePoints, null)); }