コード例 #1
0
ファイル: Class795.cs プロジェクト: 15831944/WW
        public void WriteTo(MemoryStream content, int version)
        {
            Interface9 writer = Class794.smethod_6((Interface6)this, (Interface7)this, content, version);

            this.ilist_1.Clear();
            this.class987_0.Product         = "CadLib";
            this.class987_0.NumberOfRecords = this.ilist_0.Count;
            this.class987_0.EntityCount     = 0;
            foreach (Class80 class80 in (IEnumerable <Class80>) this.ilist_0)
            {
                if (class80 is Class187)
                {
                    ++this.class987_0.EntityCount;
                }
                if (class80 is Class98)
                {
                    ++this.class987_0.EntityCount;
                }
            }
            writer.imethod_16(this.class987_0);
            this.WriteTo(writer);
            if (writer.FileFormatVersion >= Class250.int_72)
            {
                writer.imethod_13("End-of-ASM-data");
            }
            else
            {
                writer.imethod_13("End-of-ACIS-data");
            }
        }
コード例 #2
0
ファイル: Class794.cs プロジェクト: 15831944/WW
        public static Point2D smethod_8(
            Interface28 xInterval,
            Interface28 yInterval,
            Point2D point)
        {
            double x = Class794.smethod_7(xInterval, point.X);
            double y = Class794.smethod_7(yInterval, point.Y);

            if (x == point.X && y == point.Y)
            {
                return(point);
            }
            return(new Point2D(x, y));
        }
コード例 #3
0
ファイル: Class794.cs プロジェクト: 15831944/WW
        public static Polygon2D[] smethod_9(
            Interface28 xInterval,
            Interface28 yInterval,
            Polygon2D[] outer,
            Polygon2D[] holes,
            bool right,
            double epsilon)
        {
            if (xInterval.IsUnbound || yInterval.IsUnbound)
            {
                Bounds2D bounds2D = new Bounds2D();
                foreach (Polygon2D polygon2D in outer)
                {
                    bounds2D.Update((IList <Point2D>)polygon2D);
                }
                if (!bounds2D.Initialized)
                {
                    return((Polygon2D[])null);
                }
                if (xInterval.IsUnbound)
                {
                    xInterval = (Interface28) new Class438(xInterval.HasUnboundStart ? bounds2D.Min.X : xInterval.Start, xInterval.HasUnboundEnd ? bounds2D.Max.X : xInterval.End, xInterval.PeriodicLength);
                }
                if (yInterval.IsUnbound)
                {
                    yInterval = (Interface28) new Class438(yInterval.HasUnboundStart ? bounds2D.Min.Y : yInterval.Start, yInterval.HasUnboundEnd ? bounds2D.Max.Y : yInterval.End, yInterval.PeriodicLength);
                }
            }
            List <Polygon2D> polygon2DList = new List <Polygon2D>();

            Polygon2D[] polygon2DArray1 = Class794.smethod_10(outer, right, true, xInterval, yInterval, epsilon);
            polygon2DList.AddRange((IEnumerable <Polygon2D>)polygon2DArray1);
            Polygon2D[] polygon2DArray2 = Class794.smethod_10(holes, right, false, xInterval, yInterval, epsilon);
            polygon2DList.AddRange((IEnumerable <Polygon2D>)polygon2DArray2);
            return(polygon2DList.ToArray());
        }
コード例 #4
0
ファイル: Class795.cs プロジェクト: 15831944/WW
        public void WriteTo(int version, out string content)
        {
            Interface9 writer = Class794.smethod_5((Interface6)this, (Interface7)this, version);

            this.ilist_1.Clear();
            writer.imethod_4(version);
            this.class987_0.Product         = "CadLib";
            this.class987_0.NumberOfRecords = this.ilist_0.Count;
            this.class987_0.EntityCount     = 0;
            foreach (Class80 class80 in (IEnumerable <Class80>) this.ilist_0)
            {
                if (class80 is Class187)
                {
                    ++this.class987_0.EntityCount;
                }
                if (class80 is Class98)
                {
                    ++this.class987_0.EntityCount;
                }
            }
            writer.imethod_16(this.class987_0);
            this.WriteTo(writer);
            content = writer.SAT;
        }
コード例 #5
0
ファイル: Class794.cs プロジェクト: 15831944/WW
        private static Polygon2D[] smethod_10(
            Polygon2D[] polies,
            bool right,
            bool outer,
            Interface28 xInterval,
            Interface28 yInterval,
            double epsilon)
        {
            bool isPeriodic1 = xInterval.IsPeriodic;
            bool isPeriodic2 = yInterval.IsPeriodic;

            if (!isPeriodic1 && !isPeriodic2)
            {
                return(polies);
            }
            List <Polygon2D> polygon2DList   = new List <Polygon2D>();
            double           periodicLength1 = xInterval.PeriodicLength;
            double           periodicLength2 = yInterval.PeriodicLength;
            Polygon2D        polygon2D1      = new Polygon2D();

            foreach (Polygon2D poly in polies)
            {
                int count = poly.Count;
                if (count > 0)
                {
                    Point2D p1 = Class794.smethod_8(xInterval, yInterval, poly[0]);
                    for (int index = 1; index <= count; ++index)
                    {
                        Point2D p2    = Class794.smethod_8(xInterval, yInterval, poly[index % count]);
                        bool    flag1 = isPeriodic1 && 2.0 * System.Math.Abs(p2.X - p1.X) > periodicLength1;
                        bool    flag2 = isPeriodic2 && 2.0 * System.Math.Abs(p2.Y - p1.Y) > periodicLength2;
                        if (flag1 || flag2)
                        {
                            if (flag1 && flag2)
                            {
                                throw new NotSupportedException("Double interval crossing not yet supported!");
                            }
                            Class794.Struct7 struct7 = flag1 ? Class794.smethod_11(xInterval, p1.X, p2.X) : Class794.smethod_11(yInterval, p1.Y, p2.Y);
                            Point2D          point2D = Class794.smethod_12(p1, p2, struct7.double_0);
                            if (flag1)
                            {
                                point2D = new Point2D(struct7.bool_0 ? xInterval.End : xInterval.Start, point2D.Y);
                                p2      = new Point2D(struct7.bool_0 ? xInterval.Start : xInterval.End, point2D.Y);
                            }
                            else
                            {
                                point2D = new Point2D(point2D.X, struct7.bool_0 ? yInterval.End : yInterval.Start);
                                p2      = new Point2D(point2D.X, struct7.bool_0 ? yInterval.Start : yInterval.End);
                            }
                            polygon2D1.Add(point2D);
                            polygon2DList.Add(polygon2D1);
                            polygon2D1 = new Polygon2D();
                        }
                        polygon2D1.Add(p2);
                        p1 = p2;
                    }
                }
            }
            if (polygon2D1.Count > 0)
            {
                if (polygon2DList.Count == 0)
                {
                    polygon2DList.Add(polygon2D1);
                }
                else
                {
                    polygon2DList.Add(polygon2D1);
                }
            }
            foreach (Polygon2D polygon2D2 in polygon2DList)
            {
                ;
            }
            return(polygon2DList.ToArray());
        }
コード例 #6
0
ファイル: Class795.cs プロジェクト: 15831944/WW
 public void ReadFrom(MemoryStream content)
 {
     this.ReadFrom(Class794.smethod_4((Interface6)this, (Interface7)this, content));
 }
コード例 #7
0
ファイル: Class795.cs プロジェクト: 15831944/WW
 public void ReadFrom(string content)
 {
     this.ReadFrom(Class794.smethod_3((Interface6)this, (Interface7)this, content));
 }