Issues with Multiple LinesVisual3D

Feb 24, 2012 at 7:51 PM


I'm using LinesVisual3D to produce an outline which works great. The problem I'm running into is having multiple outlines on screen with different properties (thickness, color, etc.). Both LineVisual3Ds are using the points from each other and creating overlapping lines. Here's a code sample:


LinesVisual3D centerline = new LinesVisual3D();
centerline.Color = Colors.Gray;
centerline.Thickness = 1;
centerline.Points.Add(new Point3D(0, 0, 0));
centerline.Points.Add(new Point3D(0, 2, 0));
LinesVisual3D profile = new LinesVisual3D();
profile.Color = Colors.DarkGreen;
profile.Thickness = 2;
profile.Points.Add(new Point3D(0, 0, 0));
profile.Points.Add(new Point3D(.25, 0, 0));
profile.Points.Add(new Point3D(.25, 2, 0));
profile.Points.Add(new Point3D(0, 2, 0));

Mar 10, 2012 at 2:36 PM

thanks for the bug report! There was a bug in the initialization of the Points dependency property - it should be corrected now. 

Also note that the Points list should contain pairs of coordinates - for each line segment. Your "profile" element will only contain two line segments.