AB4D Forum

Full Version: Line Thickness
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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?
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.