Exemplo n.º 1
0
        public void CreateRevolveMesh(Model model1)
        {
            Shapes shapes = new Shapes();
            Region region = new Region(shapes.StandingCircle());

            var startAngle = Utility.DegToRad(0);
            var deltaAngle = Utility.DegToRad(90);
            var axisStart  = new Point3D(-50, 0, 0);
            var axisEnd    = new Point3D(-50, 0, 100);
            var slices     = 10;
            var tolerance  = 0.1;

            Mesh mesh = region.RevolveAsMesh(startAngle, deltaAngle, axisStart, axisEnd, slices, tolerance, Mesh.natureType.Plain);

            mesh.Color       = Color.YellowGreen;
            mesh.ColorMethod = colorMethodType.byEntity;
            model1.Entities.Add(mesh);
            model1.Invalidate();
        }