Issues with Multiple LinesVisual3D

Anonymous 10 years ago 0
This discussion was imported from CodePlex

mcrxb wrote at 2012-02-24 20:51:


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));

objo wrote at 2012-03-10 15:36:

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.