Esempio n. 1
0
        public void CreateByFace_InvalidArgs()
        {
            var p1 = Point.ByCoordinates(0.0, 0.0, 0.0);
            var p2 = Point.ByCoordinates(1.0, 1.0, 0);
            var p3 = Point.ByCoordinates(2.0, 0, 0);

            var surf1 = Surface.ByPerimeterPoints(new List <Point>()
            {
                p1, p2, p3
            });

            var q1 = Point.ByCoordinates(0.0, 0.0, 2.0);
            var q2 = Point.ByCoordinates(1.0, 1.0, 2);
            var q3 = Point.ByCoordinates(2.0, 0, 2);

            var surf2 = Surface.ByPerimeterPoints(new List <Point>()
            {
                q1, q2, q3
            });

            System.Collections.Generic.List <Surface> surfaces = new System.Collections.Generic.List <Surface>()
            {
                surf1, surf2
            };

            var line = Line.ByStartPointEndPoint(p1, q1);

            Assert.Throws(typeof(System.ArgumentException), () => Dimension.ByFaces(Revit.Application.Document.Current.ActiveView, surfaces, line));
        }