Пример #1
0
 // Token: 0x0600001B RID: 27 RVA: 0x00002D54 File Offset: 0x00000F54
 public static int[] toPointArray(ItGePoint3d point)
 {
     return(new int[]
     {
         CNCDataBase.convertToMM(point.x),
         CNCDataBase.convertToMM(point.y),
         CNCDataBase.convertToMM(point.z)
     });
 }
Пример #2
0
		// Token: 0x06000270 RID: 624 RVA: 0x0000FE94 File Offset: 0x0000E094
		public void sendToUniwrapper()
		{
			ItDebug.assert(this.status == WireItem.Status.RelativeToSteelmat, "Can't write wire items before their coordinates are transformed to be relative to steelmats origin");
			int diameter = CNCDataBase.convertToMM(this.WireDiameter);
			int length = CNCDataBase.convertToMM(this.Length);
			int[] startpoint = CNCDataBase.toPointArray(this.StartPoint);
			int pitch = CNCDataBase.convertToMM((double)this.Pitch);
			int spacerStartpoint = CNCDataBase.convertToMM((double)this.SpacerStartPoint);
			int spacerPitch = CNCDataBase.convertToMM((double)this.SpacerPitch);
			ItUniWrapperImpl.AddCFSRodstock(this.ReinforcementType, this.SteelQuality, this.NumberOfIrons, diameter, length, startpoint, pitch, this.Angle, this.ArticleNumber, this.AutomaticProduction, this.SpacerType, spacerStartpoint, spacerPitch, this.AdditionalStore);
		}
Пример #3
0
        // Token: 0x060001D8 RID: 472 RVA: 0x0000CA88 File Offset: 0x0000AC88
        private void UnitechnikWriteRebarAsFreeForm()
        {
            ItDebug.assert(base.IronSetsSchematic.any <List <ItGeCurve3d> >() && base.IronSetsSchematic[0].Count > 1, "Do not call this method for anything but bending forms.");
            ItUniWrapperImpl.RodstockData data = default(ItUniWrapperImpl.RodstockData);
            List <ItGeCurve3d>            list = base.IronSetsSchematic[0];
            ItGeVector3d normal;
            short        unitechnikAngleOfFreeForm = base.GetUnitechnikAngleOfFreeForm(list[0], out normal);
            int          num;
            double       dValue;

            this.GetSpacingAndCountForUnitechnik(unitechnikAngleOfFreeForm, out num, out dValue);
            int         freeFormLength = SteelGroupElementRebar.GetFreeFormLength(list);
            ItGePoint3d startPoint     = base.GetStartPoint(base.IronSetsSchematic);

            data.length              = (uint)freeFormLength;
            data.startAngle          = unitechnikAngleOfFreeForm;
            data.artNr               = string.Empty;
            data.autoProd            = 0;
            data.diameter            = (ushort)CNCDataBase.convertToMM(base.RebarBarType.BarDiameter);
            data.flexFormNumber      = 0;
            data.formType            = 2;
            data.hasSpacers          = 0;
            data.hasWielding         = 0;
            data.installationHeight  = (uint)CNCDataBase.convertToMM(startPoint.z);
            data.number              = (ushort)num;
            data.pitch               = CNCDataBase.convertToMM(dValue);
            data.pitchSpacer         = 0u;
            data.startingPointSpacer = 0u;
            data.reinfType           = (byte)base.CNCReinfTypeValue;
            data.steelQuality        = SteelGroupElementRebarBase.GetSteelQuality(base.RebarBarType);
            data.xcoord              = CNCDataBase.convertToMM(startPoint.x);
            data.ycoord              = CNCDataBase.convertToMM(startPoint.y);
            List <ItUniWrapperImpl.FreeFormSegment> list2 = new List <ItUniWrapperImpl.FreeFormSegment>();
            int num2;

            for (int i = 0; i < list.Count; i = num2 + 1)
            {
                ItGeCurve3d itGeCurve3d = list[i];
                ItGeCurve3d nextCurve   = list.ElementAtOrDefault(i + 1);
                short       unitechnikAngleOfNextSegment = this.GetUnitechnikAngleOfNextSegment(itGeCurve3d, nextCurve, normal);
                list2.Add(new ItUniWrapperImpl.FreeFormSegment
                {
                    length = (uint)CNCDataBase.convertToMM(itGeCurve3d.len),
                    angle  = unitechnikAngleOfNextSegment
                });
                num2 = i;
            }
            ItUniWrapperImpl.AddFreeFormRodstock(data, list2);
        }
Пример #4
0
        // Token: 0x060001A1 RID: 417 RVA: 0x0000B7F8 File Offset: 0x000099F8
        internal override void WriteToUnitechnik(ICollection <ExportReinfData> exportedElements)
        {
            int[] pos      = CNCDataBase.toPointArray(base.PosPalette);
            int   maxLen   = CNCDataBase.convertToMM(this._maxLength);
            int   maxWidth = CNCDataBase.convertToMM(this._maxWidth);

            ItUniWrapperImpl.AddSteelmat(this._cfsName, maxLen, maxWidth, this._toTurn, this._stopOnTurn, this._matType, pos);
            foreach (WireItem wireItem in base.WireItemsMajor.Union(base.WireItemsMinor))
            {
                wireItem.sendToUniwrapper();
            }
            exportedElements.Add(new ExportReinfData
            {
                Id         = base.FabricSheet.Id,
                ExportedAs = ExportReinfData.ExportType.AsCFS
            });
        }
Пример #5
0
        // Token: 0x06000238 RID: 568 RVA: 0x0000F724 File Offset: 0x0000D924
        internal override void WriteToPXML(ItSteel steelBlock, ICollection <ExportReinfData> exportedElements)
        {
            ItSteelExt itSteelExt = new ItSteelExt();

            itSteelExt.type = "01";
            itSteelExt.Info = CNCDataBase.paddedInt5(this.Count) + " " + this.Weight.ToString("000.000", CultureInfo.InvariantCulture);
            FabricSheetType sheetType = SteelGroupElementMeshBase.GetSheetType(base.FabricSheet.Element);

            itSteelExt.SheetType = (((sheetType != null) ? sheetType.Name : null) ?? string.Empty);
            itSteelExt.Count     = this.Count;
            itSteelExt.Weight    = Math.Round(this.Weight, 3);
            steelBlock.steelExtList.Add(itSteelExt);
            exportedElements.Add(new ExportReinfData
            {
                Id         = base.FabricSheet.Id,
                ExportedAs = ExportReinfData.ExportType.AsExtIron
            });
        }
Пример #6
0
        // Token: 0x06000044 RID: 68 RVA: 0x00003DE8 File Offset: 0x00001FE8
        public void setParametersForUnitechnik(int[] iParameters, int count, double offset, double x, double y)
        {
            bool flag = iParameters.isNull() || iParameters.Length != 10;

            if (flag)
            {
                ItDebug.assert(false, "Input parameter ");
            }
            else
            {
                ItBracedGirderData.DataInFeet cncdata = this.GetCNCData(count, offset);
                iParameters[0] = cncdata.Count;
                iParameters[1] = CNCDataBase.convertToMM(cncdata.Length);
                iParameters[2] = CNCDataBase.convertToMM(x);
                iParameters[3] = CNCDataBase.convertToMM(y);
                iParameters[4] = CNCDataBase.convertToMM(cncdata.Offset);
                iParameters[5] = (int)ItAngle.toDegree(cncdata.Angle);
                iParameters[6] = CNCDataBase.convertToMM(cncdata.Height);
                iParameters[7] = CNCDataBase.convertToMM(cncdata.Diameter);
                iParameters[8] = (int)(cncdata.Weight * 1000.0);
                iParameters[9] = CNCDataBase.convertToMM(cncdata.InstallationHeight);
            }
        }
Пример #7
0
		// Token: 0x06000271 RID: 625 RVA: 0x0000FF44 File Offset: 0x0000E144
		public void writeToUnitechnik(TextWriter writer, int ironNumber)
		{
			ItDebug.assert(this.status == WireItem.Status.RelativeToSteelmat, "Can't write wire items before their coordinates are transformed to be relative to steelmats origin");
			writer.Write(CNCDataBase.paddedInt3(ironNumber) + " ");
			writer.Write("000 ");
			writer.Write(CNCDataBase.paddedInt(this.ReinforcementType, 1, false) + " ");
			writer.Write(this.SteelQuality + " ");
			writer.Write(CNCDataBase.paddedInt(this.NumberOfIrons, 5, false) + " ");
			writer.Write(CNCDataBase.toMMString3(this.WireDiameter) + " ");
			writer.Write(CNCDataBase.toMMString5(this.Length, false) + " ");
			writer.Write(CNCDataBase.toSignedMMString5(this.StartPoint.x) + " ");
			writer.Write(CNCDataBase.toSignedMMString5(this.StartPoint.y) + " ");
			writer.Write(CNCDataBase.toSignedMMString5((double)this.Pitch) + " ");
			writer.Write(CNCDataBase.toMMString((double)this.Angle, 3, true) + " ");
			writer.Write(CNCDataBase.padString(this.ArticleNumber, 10) + " ");
			writer.Write(this.AutomaticProduction + writer.NewLine);
			writer.Write(CNCDataBase.paddedInt3(this.SpacerType) + " ");
			writer.Write("000 ");
			writer.Write("000 ");
			writer.Write(CNCDataBase.toMMString5((double)this.SpacerStartPoint, false) + " ");
			writer.Write(CNCDataBase.toMMString5((double)this.SpacerPitch, false) + " ");
			writer.Write(CNCDataBase.toMMString5(this.StartPoint.z, false) + " ");
			writer.Write(this.AdditionalStore + writer.NewLine);
		}
        // Token: 0x06000221 RID: 545 RVA: 0x0000EEA0 File Offset: 0x0000D0A0
        protected void UnitechnikAddStraightBars(List <List <ItGeCurve3d> > arrayIrons, ElementId id)
        {
            List <ItGeCurve3d> list = arrayIrons.FirstOrDefault <List <ItGeCurve3d> >();
            bool flag = list == null;

            if (flag)
            {
                ItFailures.PostFailure(ItFailures.CAMObjectWithoutValidGeometry, id);
            }
            else
            {
                ItGeCurve3d itGeCurve3d = list.FirstOrDefault <ItGeCurve3d>();
                bool        flag2       = itGeCurve3d == null;
                if (flag2)
                {
                    ItFailures.PostFailure(ItFailures.CAMObjectWithoutValidGeometry, id);
                }
                else
                {
                    ItGePoint3d itGePoint3d;
                    itGeCurve3d.hasStartPoint(out itGePoint3d);
                    ItGeVector3d itGeVector3d;
                    short        unitechnikAngleOfFreeForm = this.GetUnitechnikAngleOfFreeForm(itGeCurve3d, out itGeVector3d);
                    bool         flag3 = arrayIrons.Count > 1;
                    int          num;
                    double       num2;
                    if (flag3)
                    {
                        this.GetSpacingAndCountForUnitechnik(unitechnikAngleOfFreeForm, out num, out num2);
                    }
                    else
                    {
                        ItGeVector3d kOrigin = ItGeVector3d.kOrigin;
                        num2 = 0.0;
                        num  = 1;
                    }
                    uint length = (uint)CNCDataBase.convertToMM(itGeCurve3d.len);
                    ItUniWrapperImpl.RodstockData data = new ItUniWrapperImpl.RodstockData
                    {
                        length              = length,
                        startAngle          = unitechnikAngleOfFreeForm,
                        artNr               = string.Empty,
                        autoProd            = 0,
                        diameter            = (ushort)CNCDataBase.convertToMM(this.RebarBarType.BarDiameter),
                        flexFormNumber      = 0,
                        formType            = 0,
                        hasSpacers          = 0,
                        hasWielding         = 0,
                        pitchSpacer         = 0u,
                        startingPointSpacer = 0u,
                        reinfType           = (byte)base.CNCReinfTypeValue,
                        steelQuality        = SteelGroupElementRebarBase.GetSteelQuality(this.RebarBarType),
                        xcoord              = CNCDataBase.convertToMM(itGePoint3d.x),
                        ycoord              = CNCDataBase.convertToMM(itGePoint3d.y),
                        installationHeight  = (uint)CNCDataBase.convertToMM(itGePoint3d.z),
                        number              = (ushort)(num2.Ne(0.0, -1.0) ? num : 1),
                        pitch               = CNCDataBase.convertToMM(num2)
                    };
                    ItUniWrapperImpl.AddStraightRodstock(data);
                    bool flag4 = num2.Eq(0.0, -1.0) && num > 1;
                    if (flag4)
                    {
                        int num3;
                        for (int i = 1; i < arrayIrons.Count; i = num3 + 1)
                        {
                            itGeCurve3d = arrayIrons[i].FirstOrDefault <ItGeCurve3d>();
                            bool flag5 = itGeCurve3d == null;
                            if (!flag5)
                            {
                                itGeCurve3d.hasStartPoint(out itGePoint3d);
                                data.xcoord = CNCDataBase.convertToMM(itGePoint3d.x);
                                data.ycoord = CNCDataBase.convertToMM(itGePoint3d.y);
                                ItUniWrapperImpl.AddStraightRodstock(data);
                            }
                            num3 = i;
                        }
                    }
                }
            }
        }
Пример #9
0
		// Token: 0x06000272 RID: 626 RVA: 0x0001017D File Offset: 0x0000E37D
		public static void writeHeaderToUnitechnik(TextWriter writer, int version, int numberOfIronSets)
		{
			writer.WriteLine("RODSTOCK");
			writer.WriteLine(CNCDataBase.paddedInt(version, 3, false));
			writer.WriteLine(CNCDataBase.paddedInt3(numberOfIronSets));
		}
Пример #10
0
 // Token: 0x06000013 RID: 19 RVA: 0x00002C28 File Offset: 0x00000E28
 public static string paddedInt3(int value)
 {
     return(CNCDataBase.paddedInt(value, 3, false));
 }
Пример #11
0
 // Token: 0x06000018 RID: 24 RVA: 0x00002CBC File Offset: 0x00000EBC
 public static string toMMString3(double value)
 {
     return(CNCDataBase.toMMString(value, 3, false));
 }
Пример #12
0
 // Token: 0x06000017 RID: 23 RVA: 0x00002CA0 File Offset: 0x00000EA0
 public static string toSignedMMString5(double value)
 {
     return(CNCDataBase.toSignedMMString(value, 5));
 }
Пример #13
0
 // Token: 0x06000016 RID: 22 RVA: 0x00002C84 File Offset: 0x00000E84
 public static string toMMString5(double value, bool sign = false)
 {
     return(CNCDataBase.toMMString(value, 5, sign));
 }
Пример #14
0
 // Token: 0x06000015 RID: 21 RVA: 0x00002C68 File Offset: 0x00000E68
 public static string toSignedMMString(double value, int digits)
 {
     return(CNCDataBase.toMMString(value, digits, true));
 }
Пример #15
0
        // Token: 0x06000014 RID: 20 RVA: 0x00002C44 File Offset: 0x00000E44
        public static string toMMString(double value, int digits, bool sign = false)
        {
            int value2 = CNCDataBase.convertToMM(value);

            return(CNCDataBase.paddedInt(value2, digits, sign));
        }
Пример #16
0
        // Token: 0x060001DA RID: 474 RVA: 0x0000CCC4 File Offset: 0x0000AEC4
        private static int GetFreeFormLength(List <ItGeCurve3d> firstSet)
        {
            double dValue = firstSet.Sum((ItGeCurve3d curve) => curve.len);

            return(CNCDataBase.convertToMM(dValue));
        }
Пример #17
0
 // Token: 0x0600001C RID: 28 RVA: 0x00002D98 File Offset: 0x00000F98
 public static int ConvertToMeter(double value)
 {
     return(CNCDataBase.convertToMM(value / 1000.0));
 }