Esempio n. 1
0
 private void GetPolylines(
     DrawContext context,
     ILineTypeScaler lineTypeScaler,
     double startAngle,
     double endAngle,
     out IList <WW.Math.Geometry.Polyline3D> polylines,
     out IList <FlatShape4D> shapes)
 {
     WW.Math.Geometry.Polyline3D polyline = this.method_14(context.Config, startAngle, endAngle);
     polylines = (IList <WW.Math.Geometry.Polyline3D>) new List <WW.Math.Geometry.Polyline3D>();
     if (context.Config.ApplyLineType)
     {
         shapes = (IList <FlatShape4D>) new List <FlatShape4D>();
         DxfUtil.smethod_4(context.Config, polylines, shapes, polyline, this.GetLineType(context), this.vector3D_0, context.TotalLineTypeScale * this.LineTypeScale, lineTypeScaler);
         if (shapes.Count != 0)
         {
             return;
         }
         shapes = (IList <FlatShape4D>)null;
     }
     else
     {
         polylines.Add(polyline);
         shapes = (IList <FlatShape4D>)null;
     }
 }
Esempio n. 2
0
        internal static void smethod_4(
            DrawContext context,
            ILineTypeScaler lineTypeScaler,
            ILeader leader,
            IList <WW.Math.Point3D> vertices,
            DxfLineType lineType,
            Vector3D zAxis,
            double lineTypeScale,
            out IList <Polyline3D> polylines,
            out IList <FlatShape4D> shapes)
        {
            Polyline3D polyline = DxfLeader.smethod_3(context, leader, vertices);

            if (context.Config.ApplyLineType)
            {
                polylines = (IList <Polyline3D>) new List <Polyline3D>();
                if (polyline != null)
                {
                    shapes = (IList <FlatShape4D>) new List <FlatShape4D>();
                    DxfUtil.smethod_4(context.Config, polylines, shapes, polyline, lineType, zAxis, context.TotalLineTypeScale * lineTypeScale, lineTypeScaler);
                    if (shapes.Count != 0)
                    {
                        return;
                    }
                    shapes = (IList <FlatShape4D>)null;
                }
                else
                {
                    shapes = (IList <FlatShape4D>)null;
                }
            }
            else
            {
                ref IList <Polyline3D> local = ref polylines;
                List <Polyline3D>      polyline3DList;
                if (polyline == null)
                {
                    polyline3DList = new List <Polyline3D>();
                }
                else
                {
                    polyline3DList = new List <Polyline3D>()
                    {
                        polyline
                    }
                };
                local  = (IList <Polyline3D>)polyline3DList;
                shapes = (IList <FlatShape4D>)null;
            }
        }
Esempio n. 3
0
 private void GetPolylines(
     DrawContext context,
     ILineTypeScaler lineTypeScaler,
     out IList <WW.Math.Geometry.Polyline3D> polylines,
     out IList <FlatShape4D> shapes)
 {
     if (this.point3D_0 == this.point3D_1)
     {
         polylines = (IList <WW.Math.Geometry.Polyline3D>) new WW.Math.Geometry.Polyline3D[1]
         {
             new WW.Math.Geometry.Polyline3D(new WW.Math.Point3D[1] {
                 this.point3D_0
             })
         };
         shapes = (IList <FlatShape4D>)null;
     }
     else
     {
         polylines = (IList <WW.Math.Geometry.Polyline3D>) new List <WW.Math.Geometry.Polyline3D>();
         WW.Math.Geometry.Polyline3D polyline = new WW.Math.Geometry.Polyline3D(new WW.Math.Point3D[2] {
             this.point3D_0, this.point3D_1
         });
         if (context.Config.ApplyLineType)
         {
             shapes = (IList <FlatShape4D>) new List <FlatShape4D>();
             DxfUtil.smethod_4(context.Config, polylines, shapes, polyline, this.GetLineType(context), this.ZAxis, context.TotalLineTypeScale * this.LineTypeScale, lineTypeScaler);
             if (shapes.Count != 0)
             {
                 return;
             }
             shapes = (IList <FlatShape4D>)null;
         }
         else
         {
             polylines.Add(polyline);
             shapes = (IList <FlatShape4D>)null;
         }
     }
 }
Esempio n. 4
0
        private void method_13(
            DrawContext context,
            ILineTypeScaler lineTypeScaler,
            out IList <WW.Math.Geometry.Polyline3D> polylines,
            out IList <FlatShape4D> shapes)
        {
            DxfHeader      header = context.Model.Header;
            GraphicsConfig config = context.Config;

            polylines = (IList <WW.Math.Geometry.Polyline3D>) new List <WW.Math.Geometry.Polyline3D>();
            shapes    = (IList <FlatShape4D>)null;
            bool approximationPointsDrawn;

            WW.Math.Geometry.Polyline3D polyline = this.method_14(config, out approximationPointsDrawn);
            if (polyline != null)
            {
                if (config.ApplyLineType)
                {
                    shapes = (IList <FlatShape4D>) new List <FlatShape4D>();
                    DxfUtil.smethod_4(context.Config, polylines, shapes, polyline, this.GetLineType(context), Vector3D.ZAxis, context.TotalLineTypeScale * this.LineTypeScale, lineTypeScaler);
                }
                else
                {
                    polylines.Add(polyline);
                }
            }
            if (config.ShowSplineControlPoints)
            {
                polylines.Add(this.method_16());
            }
            if (!config.ShowSplineApproximationPoints || approximationPointsDrawn)
            {
                return;
            }
            polylines.Add(this.method_17());
        }