예제 #1
0
        public void ByViewAndFaceAnalysisData_BadArgs()
        {
            var surface = AnalysisDisplayHelpers.GetFirstSurfaceInInPlaceMass();

            var samplePoints = new[]
            {
                UV.ByCoordinates(0, 0),
                UV.ByCoordinates(0.5, 0),
                UV.ByCoordinates(0, 0.5)
            };

            var sampleValues = new[]
            {
                1.0,
                1092,
                -1
            };

            var data = SurfaceAnalysisData.BySurfacePointsAndResults(surface, samplePoints, new List <string>()
            {
                "Sample Data"
            }, new IList <double>[] { sampleValues });
            var doc = Document.Current;

            Assert.Throws(typeof(System.ArgumentNullException), () => FaceAnalysisDisplay.ByViewAndFaceAnalysisData(null, new [] { data }));
            Assert.Throws(typeof(System.ArgumentNullException), () => FaceAnalysisDisplay.ByViewAndFaceAnalysisData(doc.ActiveView, null));
            Assert.Throws(typeof(System.Exception), () => FaceAnalysisDisplay.ByViewAndFaceAnalysisData(doc.ActiveView, new SurfaceAnalysisData[] {}));
        }
예제 #2
0
        public void ByViewAndFaceAnalysisData_ValidArgs()
        {
            var surface = AnalysisDisplayHelpers.GetFirstSurfaceInInPlaceMass();

            var samplePoints = new[]
            {
                UV.ByCoordinates(0, 0),
                UV.ByCoordinates(0.1, 0.2),
                UV.ByCoordinates(0, 0.1),
            };

            var sampleValues = new[]
            {
                1.0,
                1092,
                -1
            };

            var data = SurfaceAnalysisData.BySurfacePointsAndResults(surface, samplePoints, new List <string>()
            {
                "Sample Data"
            }, new IList <double>[] { sampleValues });

            var doc  = Document.Current;
            var grid = FaceAnalysisDisplay.ByViewAndFaceAnalysisData(doc.ActiveView, new [] { data });

            Assert.NotNull(grid);
        }
예제 #3
0
        public void ByViewAndFaceAnalysisData_ValidArgs()
        {
            var surface = AnalysisDisplayHelpers.GetFirstSurfaceInInPlaceMass();

            var samplePoints = new[]
            {
                UV.ByCoordinates(0, 0),
                UV.ByCoordinates(0.1, 0.2),
                UV.ByCoordinates(0, 0.1),
            };

            var sampleValues = new[]
            {
                1.0,
                1092,
                -1
            };

            var data = SurfaceData.BySurfacePointsAndValues(surface, samplePoints, sampleValues);

            var doc  = Document.Current;
            var grid = FaceAnalysisDisplay.ByViewAndFaceAnalysisData(doc.ActiveView, data);

            Assert.NotNull(grid);
        }
예제 #4
0
        public void ByViewAndFaceAnalysisData_BadArgs()
        {
            var surface = AnalysisDisplayHelpers.GetFirstSurfaceInInPlaceMass();

            var samplePoints = new[]
            {
                UV.ByCoordinates(0, 0),
                UV.ByCoordinates(0.5, 0),
                UV.ByCoordinates(0, 0.5)
            };

            var sampleValues = new[]
            {
                1.0,
                1092,
                -1
            };

            var data = SurfaceData.BySurfacePointsAndValues(surface, samplePoints, sampleValues);
            var doc  = Document.Current;

            Assert.Throws(typeof(System.ArgumentNullException), () => FaceAnalysisDisplay.ByViewAndFaceAnalysisData(null, data));
            Assert.Throws(typeof(System.ArgumentNullException), () => FaceAnalysisDisplay.ByViewAndFaceAnalysisData(doc.ActiveView, null));
        }