Esempio n. 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)
     });
 }
Esempio n. 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);
		}
        // 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);
        }
Esempio n. 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
            });
        }
Esempio n. 5
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);
            }
        }
        // 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));
        }
        // 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;
                        }
                    }
                }
            }
        }
Esempio n. 8
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));
        }
Esempio n. 9
0
 // Token: 0x0600001C RID: 28 RVA: 0x00002D98 File Offset: 0x00000F98
 public static int ConvertToMeter(double value)
 {
     return(CNCDataBase.convertToMM(value / 1000.0));
 }