AB4D Forum
Line Thickness - Printable Version

+- AB4D Forum (https://forum.ab4d.com)
+-- Forum: Products Forums (https://forum.ab4d.com/forumdisplay.php?fid=4)
+--- Forum: Ab3d.PowerToys (https://forum.ab4d.com/forumdisplay.php?fid=9)
+--- Thread: Line Thickness (/showthread.php?tid=245)



Line Thickness - brians - 02-23-2012

There seems to be a difference of scale when setting line thicknesses?

I'm creating a polyline and a line3d (see attached):

Line3DFactory.CreatePolyLine3D (yellow)
Line3DFactory.CreateLine3D (red)

but to get the line thicknesses to look the same, the poly line has 0.4 and the line3d 12 set as thicknesses.



Why is this?


RE: Line Thickness - abenedik - 03-12-2012

That is strange.

The following code works correctly:

Code:
Point3DCollection coll = new Point3DCollection(new Point3D[] { new Point3D(0,0,0), new Point3D(100,0,0), new Point3D(100,100,0) });

            GeometryModel3D polyModel = Line3DFactory.CreatePolyLine3D(coll, 12, Colors.Red, false, Ab3d.Common.Models.LineCap.Flat, Ab3d.Common.Models.LineCap.Flat, MainViewport);
            Group1.Children.Add(polyModel);
            
            GeometryModel3D lineModel = Line3DFactory.CreateLine3D(new Point3D(100,100,0), new Point3D(0,100,0), 12, Colors.Blue, Ab3d.Common.Models.LineCap.Flat, Ab3d.Common.Models.LineCap.Flat, MainViewport);
            Group1.Children.Add(lineModel);

Maybe you have wrongly set the last parameter: Viewport3D / Visual3D - if you have specified different Viewport3D or Visual3D than the transformation that transforms the 3d space into screen space gives different results and applies thickness differently.