TubeVisual3D and Diameters

Feb 16, 2013 at 8:25 PM
Have nice time of a day.
At first, I want to say "thank you", Your project is something awesome.
I didn't dive deep into Your code yet, but i have a question. As I can see, TubeVisual3D is an element for making curve tubes with variable diameters throug path - so, what i'm doing wrong?:
TubeVisual3D t = new TubeVisual3D();
            t.Fill = System.Windows.Media.Brushes.Black;
            
            Point3DCollection p3dc = new Point3DCollection();
            List<double> diamlist = new List<double>();
            double dx = 15;
            double dy = 15;
            double dz = 15;
            double dd = 10;
            int n = 30;
            for (int i = 1; i < n; i++)
            {
                p3dc.Add(new Point3D(0 + Math.Pow((double)i / n, 3) * dx, 0 + ((double)i / n) * dy, 0 + ((double)i / n) * dz));
                diamlist.Add(3.5 + ((double)i / n) * dd);
            }
            t.Path = p3dc;
            t.Diameters = diamlist;            
            _HelixViewport3D.Children.Add(t);
and i'm got curve pipe with constant diameter of 1.

Best regards.

p.s. sorry for my bad english, it isn't my native language)
Coordinator
Feb 16, 2013 at 10:18 PM
try changing the order of setting Diameters and Path
t.Diameters = diamlist;
t.Path = p3dc;
If you set the diameters last, the mesh will be generated twice.
I will correct the bug.
Feb 17, 2013 at 7:15 AM
Wow! Great. TY.