Using a diameter list halves diameter?

Jun 18, 2013 at 3:45 PM
Sorry to do two threads back to back, but I've run into another problem.
As the title said, using a diameter list for a TubeVisual3D instead of one set diameter seems to half the diameter at every point.

I've edited streamlines to see if the problem is here, and it doesn't seem so, setting the tube diameters to one, and the cone radius to .5 produced similar diameters, so I would guess the MeshBuilder tubes are fine, but this:
 private void DiamListTube_Click(object sender, RoutedEventArgs e)
        {
            TubeVisual3D diamListTube = new TubeVisual3D();

            Point3DCollection tubePath = new Point3DCollection();
            tubePath.Add(new Point3D(0,  0, 5));
            tubePath.Add(new Point3D(32, 0, 5));

            IList<double> diameterList = new List<double>();
            diameterList.Add(10.0);
            diameterList.Add(10.0);

            diamListTube.Diameters = diameterList;
            diamListTube.Path = tubePath;
            diamListTube.Fill = Brushes.Red;
            MainViewPort.Children.Add(diamListTube);
        }

        private void NoDiamList_Click(object sender, RoutedEventArgs e)
        {
            TubeVisual3D tube = new TubeVisual3D();    

            Point3DCollection tubePath = new Point3DCollection();
            tubePath.Add(new Point3D(0, 10, 5));
            tubePath.Add(new Point3D(32, 10, 5));

            tube.Diameter = 10.0;
            tube.Path = tubePath; 
            tube.Fill = Brushes.Blue;
            MainViewPort.Children.Add(tube);

        }
Produces this:
Image

Am I doing something wrong, or is the Diameter list the issue?
Jun 18, 2013 at 9:11 PM
thanks, this is a bug in the library! I added issue https://helixtoolkit.codeplex.com/workitem/9988
Jun 19, 2013 at 8:32 PM
I have corrected the bug in the TubeVisual3D class.
I also changed the type of the Diameters property, so we can test by the following xaml:
<HelixToolkit:TubeVisual3D Path="0 0 5,32 0 5" Diameters="10,10" Fill="Red"/>
<HelixToolkit:TubeVisual3D Path="0 10 5,32 10 5" Diameter="10" Fill="Blue"/>