Esempio n. 1
0
        public void ByViewFacePointsAndValues_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 doc = Document.Current;

            Assert.Throws(typeof(System.ArgumentNullException), () => FaceAnalysisDisplay.ByViewFacePointsAndValues(null, surface, samplePoints, sampleValues));
            Assert.Throws(typeof(System.ArgumentNullException), () => FaceAnalysisDisplay.ByViewFacePointsAndValues(doc.ActiveView, null, samplePoints, sampleValues));
            Assert.Throws(typeof(System.ArgumentNullException), () => FaceAnalysisDisplay.ByViewFacePointsAndValues(doc.ActiveView, surface, null, sampleValues));
            Assert.Throws(typeof(System.ArgumentNullException), () => FaceAnalysisDisplay.ByViewFacePointsAndValues(doc.ActiveView, surface, samplePoints, null));
        }
Esempio n. 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);
        }
Esempio n. 3
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[] {}));
        }
Esempio n. 4
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);
        }