capping extrusions?

Anonymous 9 years ago 0
This discussion was imported from CodePlex

mihaipruna wrote at 2014-08-24 19:36:

Hi, this is the code I am using to create an extrusion. I'd like to cap the ends so it looks solid.
    ExtrudedVisual3D extru = new ExtrudedVisual3D();
                System.Windows.Media.PointCollection collpo = new PointCollection();
                foreach (Point popo in sketchy.points2dlist  )
                extru.Section = collpo;
                extru.SectionXAxis = xaxis;
                extru.Transform = groupo;
                extru.Material = new DiffuseMaterial(new SolidColorBrush(colo));
                extru.IsSectionClosed = true;
                Point3DCollection collpa=new Point3DCollection();
               foreach (Point3D po3 in pupo.points3dlist)
                extru.Path = collpa;

                extru.Fill = new SolidColorBrush(colo);