0

CuttingPlane giving Exception with Pipe - Version 2014 1.1.1

Anonymous 10 years ago 0
This discussion was imported from CodePlex

terry_513 wrote at 2014-02-12 13:14:

In my Model, I have a PipeVisual3d. I have a CuttingPlane in my HelixViewport. MY aim is to cut the Pipe in half. The moment I add Plane3D to CuttingPlanes, system executes Cut method from MeshGeometryHelper class & throws a NullException on line
textureCoordinates.ForEach(meshBuilder.TextureCoordinates.Add)
meshBuilder.TextureCoordinates in the class is null.

My code is :
            PipeVisual3D pipe1; // = DrawPipeOrg();
            pipe1 = new PipeVisual3D
                    {
                        Point1 = new Point3D(0, 0, (-10 - 0.1)),
                        Point2 = new Point3D(0, 0, (-15 + 0.1)),
                        Diameter = 2*7.86,
                        InnerDiameter = 2*1.5,
                       // Material =  HelixToolkit.Wpf.Materials.Green,
                       // BackMaterial = HelixToolkit.Wpf.Materials.Green
                    };
            model.Children.Add(pipe1); 
            c = new Plane3D { Position = new Point3D(0, 0, -10), Normal = new Vector3D(0, 0, -1) };
            cuttingGroup1.CuttingPlanes.Add(c);
In previous version I had used the same code and it was working perfectly well. But in 2014 1.1.1, it throws this exception. I tried with BoxVisual3D & Rectangle & it does work, but seems their is some problem with PipeVisual3D with CuttingPlane.

Objo, Can you please look into the matter and make it working.

Please help me out with this, couldn't find any way for this issue.
Thanks.