예제 #1
0
 private void method_2(Stream A_0)
 {
     this.stream_0          = A_0;
     this.stream_0.Position = 0L;
     this.class522_0        = new Class522(new BinaryReader(this.stream_0, Encoding.Unicode));
     this.class917_0        = new Class917(this.stream_0, this.class522_0);
     this.class917_0.method_6();
     this.method_3();
     this.class916_0 = new Class916(this.method_10(this.class522_0.uint_3, this.class522_0.method_0(), this.class522_0.method_0(), true));
     this.method_9();
 }
예제 #2
0
 public virtual void imethod_3(
     Class95 loop,
     Class88 curve,
     Class107 coedge,
     Class917 approximation,
     Class258 accuracy)
 {
     if (this.interface5_0 == null)
     {
         return;
     }
     this.interface5_0.imethod_3(loop, curve, coedge, approximation, accuracy);
 }
예제 #3
0
파일: Class107.cs 프로젝트: 15831944/WW
 public override void vmethod_3(Class608 wires)
 {
     try
     {
         if (this.class96_0.Curve != null)
         {
             Class917 approximation = new Class917();
             ((Class88)this.class96_0.Curve).CurvePrimitive.imethod_3((Class95)this.class80_1, (Class88)this.class96_0.Curve, this, approximation, wires.Accuracy);
             wires.method_9((ICollection <Point3D>)approximation.Points, false);
             return;
         }
     }
     catch (InvalidCastException ex)
     {
     }
     this.class96_0.vmethod_3(wires);
 }
예제 #4
0
    public void method_5(Stream A_0)
    {
        if (A_0 == null)
        {
            throw new ArgumentNullException();
        }
        Stream stream = null;

        if (!A_0.CanSeek)
        {
            stream = A_0;
            A_0    = new MemoryStream();
        }
        this.stream_0          = A_0;
        this.stream_0.Position = 0x200L;
        this.class522_0        = new Class522();
        this.class917_0        = new Class917(this.stream_0, this.class522_0);
        this.class916_0        = new Class916();
        this.memoryStream_0    = new MemoryStream();
        this.class410_0        = new Class410();
        this.method_6(this.class1089_0, null);
        if (this.memoryStream_0.Length > 0L)
        {
            int num;
            this.class410_0.method_0(0).uint_4 = this.method_8(this.memoryStream_0, true);
            this.class410_0.method_0(0).long_2 = this.memoryStream_0.Length;
            this.class522_0.uint_3             = this.method_7(this.class916_0.method_4(), true, out num);
            this.class522_0.int_7 = num;
        }
        else
        {
            this.class522_0.uint_3 = 0xfffffffe;
        }
        this.class522_0.uint_2 = this.method_8(this.class410_0.method_7(), true);
        this.class917_0.method_8();
        this.stream_0.Position = 0L;
        this.class522_0.method_1(new BinaryWriter(this.stream_0, Encoding.Unicode));
        this.stream_0.Position = this.stream_0.Length;
        if (stream != null)
        {
            A_0.Position = 0L;
            ((MemoryStream)A_0).WriteTo(stream);
            A_0.Close();
            A_0 = stream;
        }
    }
예제 #5
0
파일: Class188.cs 프로젝트: 15831944/WW
        public virtual void vmethod_2(Class95 firstLoop, Class608 wires)
        {
            Interface26 pointParamMapper = this.PointParamMapper;

            if (pointParamMapper != null)
            {
                List <Polygon2D> polygon2DList1 = new List <Polygon2D>();
                List <Polygon2D> polygon2DList2 = new List <Polygon2D>();
                foreach (Class95 loop in (IEnumerable <Class95>)Class80.smethod_0 <Class95>(firstLoop))
                {
                    Class917  approximation = new Class917();
                    Polygon2D polygon2D1    = new Polygon2D();
                    foreach (ns9.Class107 coedge in (IEnumerable <ns9.Class107>)loop.Coedges)
                    {
                        ns9.Class88 curve = (ns9.Class88)coedge.Edge.Curve;
                        if (curve != null)
                        {
                            curve.CurvePrimitive.imethod_3(loop, curve, coedge, approximation, wires.Accuracy);
                        }
                        else
                        {
                            Polyline2D polyline2D = this.vmethod_1(coedge);
                            polygon2D1.AddRange((IEnumerable <Point2D>)polyline2D);
                        }
                    }
                    if (polygon2D1.Count > 0)
                    {
                        if (pointParamMapper.IsRightHandedParametric)
                        {
                            if (polygon2D1.GetArea() >= 0.0)
                            {
                                polygon2DList1.Add(polygon2D1);
                            }
                            else
                            {
                                polygon2DList2.Add(polygon2D1);
                            }
                        }
                        else if (polygon2D1.GetArea() < 0.0)
                        {
                            polygon2DList1.Add(polygon2D1);
                        }
                        else
                        {
                            polygon2DList2.Add(polygon2D1);
                        }
                    }
                    Point3D[] points = approximation.Points;
                    if (points.Length > 0)
                    {
                        Polygon2D polygon2D2 = new Polygon2D(points.Length);
                        foreach (Point3D point in points)
                        {
                            polygon2D2.Add(pointParamMapper.imethod_0(point));
                        }
                        if (pointParamMapper.IsRightHandedParametric)
                        {
                            if (polygon2D2.GetArea() >= 0.0)
                            {
                                polygon2DList1.Add(polygon2D2);
                            }
                            else
                            {
                                polygon2DList2.Add(polygon2D2);
                            }
                        }
                        else if (polygon2D2.GetArea() < 0.0)
                        {
                            polygon2DList1.Add(polygon2D2);
                        }
                        else
                        {
                            polygon2DList2.Add(polygon2D2);
                        }
                    }
                }
                if (polygon2DList1.Count == 0 && polygon2DList2.Count != 0)
                {
                    foreach (List <Point2D> point2DList in polygon2DList2)
                    {
                        point2DList.Reverse();
                    }
                    polygon2DList1.AddRange((IEnumerable <Polygon2D>)polygon2DList2);
                    polygon2DList2.Clear();
                }
                Polygon2D[] paramShape = Class794.smethod_9(this.ExtendedIntervalU, this.ExtendedIntervalV, polygon2DList1.ToArray(), polygon2DList2.ToArray(), pointParamMapper.IsRightHandedParametric, wires.Accuracy.Epsilon);
                if (paramShape == null)
                {
                    return;
                }
                foreach (Polygon2D polygon2D in paramShape)
                {
                    Polygon3D polygon3D = new Polygon3D(polygon2D.Count);
                    foreach (Point2D point2D in (List <Point2D>)polygon2D)
                    {
                        polygon3D.Add(pointParamMapper.imethod_1(point2D.X, point2D.Y));
                    }
                    wires.method_9((ICollection <Point3D>)polygon3D, true);
                }
                this.vmethod_0(wires, paramShape, pointParamMapper);
            }
            else
            {
                Class80.smethod_2((Class80)firstLoop, wires);
            }
        }